Looping functions in an event procedure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to set up a loop procedure as an after update in a form to ensure
correct data is entered and remain in that field until the data is correct.
What would be the best function to use and as I don't know much about visual
basic could you explain a little on how this would be structured.

Thanks in advance

Mabeline
 
Mabeline said:
I want to set up a loop procedure as an after update in a form to ensure
correct data is entered and remain in that field until the data is correct.
What would be the best function to use and as I don't know much about visual
basic could you explain a little on how this would be structured.


Use the BeforeUpdate event, it can be cancelled.

If <data is not valid> Then Cancel = True

Note, your users will curse the names of your children every
time they can't think of an acceptable value and you will
curse them in return when their frustration leads them to
power off their computer ;-)
 
Marshall,

Thank you very much for your help, it worked as you said it would. My
children are old enough now to handle any curses, I hope but I take your
point about turning off the computer. I probably would as well.

Regards
Mbeline.
 
Back
Top