Condition to run validation macro on field with focus

G

Guest

Hello!
I am looking for some help to run a validation macro on multiple fields.
Specifically, I have 11 fields on a form, each one a YES/NO data type, and i
would like to run the condition macro on the Before Update proerty, such that
if the field is set to YES and the user resets it to NO, a MsgBox pops up
confirming the change. If the field is set to NO and the user changes it to
YES, nothiing should happen. Where I run into a problem is setting up a
macro that can run on each field without having to refer to each field
individually, and thus create 11 macros, one for each field on the control.
Essentially, I am looking to write 1 macro with one condition in this fashion:
[fieldname]<>-1 MsgBox
where [fieldname] refers to the current field with the focus of the user.
Can you help, or do you need more clarification?

Thanks,
jerobin1
 

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