Andy Lacey
andy at minstersystems.co.uk
Mon Apr 5 11:51:25 CDT 2004
Hi Virginia subControl refers to the name on the main form that you've given to the subform control (think Access defaults to Childnnn, but you'd want to change that to something meaningful). The tab doesn't affect it. Not so sure you can do Undo in the same way. The problem (I think, but open to correction) is that, having put data onto a subform, if you click away from the subform to the main form (i.e. to your Undo button on the main form) Access carries out a Save of the subform data. And once the save has occurred you can't Undo. Undo is only available BeforeUpdate. What I'd suggest is that you place the Undo button in the header of the subform rather than on the main form. It can then just do a Me.Undo and should work ok as focus won't have moved off the sub. -- Andy Lacey http://www.minstersystems.co.uk > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Hollis,Virginia > Sent: 05 April 2004 12:25 > To: 'Access Developers discussion and problem solving' > Subject: RE: [AccessD] AllowEdits on Subform > > > Another one - what about Undo? I used > Forms!frm_Vendor.frm_ContactsSub.Form.Undo but it does not > undo the entry on the subform. > > Also, where you have Me!subControl - that is not the name of > the form is it? Is it each control on the form? This is a > tabbed form I placed the subform on one of the tabs. > > Virginia > > > -----Original Message----- > From: Andy Lacey [mailto:andy at minstersystems.co.uk] > Sent: Saturday, April 03, 2004 1:53 PM > To: 'Access Developers discussion and problem solving' > Subject: RE: [AccessD] AllowEdits on Subform > > > A subform has its own AllowEdits property Virginia. You can > control it with the following code: > > Me!subControl.Form.AllowEdits = True/False > > -- Andy Lacey > http://www.minstersystems.co.uk > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > > Hollis,Virginia > > Sent: 03 April 2004 18:50 > > To: 'accessd at databaseadvisors.com' > > Subject: [AccessD] AllowEdits on Subform > > > > > > How do you prevent/allow Edits on a subform? > > > > I have a command button that is used to Edit a record. The > > form does not allow edits without using the Edit Record > > button. The problem is that the subform still allows edits > > without using the Edit Record button. > > > > Virginia > > -- > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/a> ccessd > > Website: > > http://www.databaseadvisors.com > > > > > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/a> ccessd > Website: > http://www.databaseadvisors.com > -- > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/a> ccessd > Website: > http://www.databaseadvisors.com > >