Looping functions in an event procedure

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
 
M

Marshall Barton

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 ;-)
 
G

Guest

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.
 

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