From: Pendragon on
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
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
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.