Add new record by button only

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

Hi,

I have a continious form which I do not want the new
record to show until a click on a "new record" command
button. I have "Allow Additions" for the form set to NO.
My "Add New Record" command button does
a "Me.AllowAdditions = True", and adds the new record.
The new record is added, but as soon as I start to type in
any field another new record appears. Where do I set the
AllowAdditions back to False to prevent the second new
record to appear? I've tried every place I can think of
but it didn't work. Usually my new record disappears.

Or, is there a better way to do what I want?

Thanks,
Phil
 
Would the AfterInsert event let you set AllowAdditions back to False?

Why is this necessary? Could you use the BeforeInsert event to test or
create whatever it is you do in the Click event of your Add New command
button? Personally, I hate interfaces that prevent me from using the
built-in functionality that all Access users already expect to work, and it
is generally because the developer did not think event-driven.
 
Back
Top