New Record as condition for Macro

  • Thread starter Thread starter bymarce
  • Start date Start date
B

bymarce

I have a macro set to open a message box in the "on update" event for a data
entry form. Can I set the condition of this macro not to run for new
records? I want my users to be warned if they try to change previously
entered data but not when entering new records. The users are viewing the
data through a form opened by a button on a switchboard. If I can't use new
record as a condition for the macro, is there something else I could do?
Thanks.
bymarce
 
"On Update"? Do you mean "Before Update" event of the form? If yes, you can
use this expression to test if the record is a new one or not:

[NewRecord] = False

The above expression will be true for existing records, but False for new
records.
 
Thanks. That worked perfectly.
bymarce

Ken Snell (MVP) said:
"On Update"? Do you mean "Before Update" event of the form? If yes, you can
use this expression to test if the record is a new one or not:

[NewRecord] = False

The above expression will be true for existing records, but False for new
records.
--

Ken Snell
<MS ACCESS MVP>




bymarce said:
I have a macro set to open a message box in the "on update" event for a
data
entry form. Can I set the condition of this macro not to run for new
records? I want my users to be warned if they try to change previously
entered data but not when entering new records. The users are viewing the
data through a form opened by a button on a switchboard. If I can't use
new
record as a condition for the macro, is there something else I could do?
Thanks.
bymarce
 
Back
Top