New Record as condition for Macro

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
 
K

Ken Snell \(MVP\)

"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.
 
B

bymarce

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top