Add New event?

  • Thread starter Thread starter GZ
  • Start date Start date
G

GZ

Hi, On an automatically created form, there are data navigation buttons.
Click the one with >* (or > when already on the last record) will allow "add
new" record. I need write some code before "add new" event such as to
provide an formatted and numbered ID. I am just wondering which event I can
put the code?

I have put the code in "Form_BeforeInsert", but it only works on form load,
not when user tries to add new.

Thanks!

GZ
 
Hi GZ

Form_BeforeInsert will only fire when the new record is made dirty, for
example by the user typing the first character in a textbox.

Use Form_Current with an If statement:
If Me.NewRecord Then
...
 
Back
Top