From: Pendragon on 4 Jan 2010 13:44 Access03/WinXP I have set a subform's Allow Additions property to False. When the user clicks on a command button on the subform, after a set of conditions are met, the Allow Additions property is set to true. I would like the Allow Additions property to be reset to false once the user clicks off of the subform to a different control in the current record, or moves to another record (via Find Record combo box). Where is the best place to reset the Allow Additions property back to false? I have tried the subform's LostFocus and Deactivate property, but this has not worked. Suggestions greatly appreciated!! Thanks.
From: theDBguy on 4 Jan 2010 13:49 Hi, Depending on your conditions, I would probably try using the Current event and check for the NewRecord property. Hope that helps... "Pendragon" wrote: > Access03/WinXP > > I have set a subform's Allow Additions property to False. When the user > clicks on a command button on the subform, after a set of conditions are met, > the Allow Additions property is set to true. > > I would like the Allow Additions property to be reset to false once the user > clicks off of the subform to a different control in the current record, or > moves to another record (via Find Record combo box). > > Where is the best place to reset the Allow Additions property back to false? > I have tried the subform's LostFocus and Deactivate property, but this has > not worked. > > Suggestions greatly appreciated!! > > Thanks.
From: Allen Browne on 4 Jan 2010 21:08 If you want to set AllowAdditions back to No at the point when a new record has been added, you could try the AfterInsert event. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Pendragon" <Pendragon(a)discussions.microsoft.com> wrote in message news:164CB12E-4532-4A37-9D5C-7F9427427EB4(a)microsoft.com... > Access03/WinXP > > I have set a subform's Allow Additions property to False. When the user > clicks on a command button on the subform, after a set of conditions are > met, > the Allow Additions property is set to true. > > I would like the Allow Additions property to be reset to false once the > user > clicks off of the subform to a different control in the current record, or > moves to another record (via Find Record combo box). > > Where is the best place to reset the Allow Additions property back to > false? > I have tried the subform's LostFocus and Deactivate property, but this has > not worked. > > Suggestions greatly appreciated!! > > Thanks.
|
Pages: 1 Prev: How can I read CSV file using VBA? Next: Last time it's OK |