Warning before changing certain fields on a form

K

Kathy Webster

Often users will accidentally change a particular field's contents in a
form. I want
to run a macro warning the user that they are getting ready to change a
particular field's contents. So I tried attaching the warning to the
field's BeforeUpdate, AfterUpdate, OnChange, and OnDirty properties. It
works EXCEPT that it unnecessarily warns them when they are typing in that
field for the first time while creating a BRAND NEW record.

How can I keep it from warning them if they are typing in that field while
creating a brand new record (for obvious reasons)?

TIA,
Kathy
 
B

Beetle

This would actually go in the VB muule for the Before Update event of the
control on your form, not in the macro. It would look something like;

If Not Me.NewRecord Then

DoCmd.RunMacro "Name of Macro"

End If

HTH
 

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