Warning before changing certain fields on a form

  • Thread starter Thread starter Kathy Webster
  • Start date Start date
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
 
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
 
Back
Top