Generic way to prevent record navigation if form not complete?

M

McGeeky

Hi. The form I am implementing has some basic workflow behind it. When the
user checks a box it opens up another section of the form - but the user
needs to complete all the fields in that section before being allowed to
progress.

However, the form has several ways to navigate away including a menu button
to go back to the main menu form, a next, previous, and close database
buttons. I want to ensure they have completed that section of the form
before navigating away.

Do I need to trap the validity of the form in each case or is there a way to
handle it generically so that an error is always raised no matter how the
user tries to navigate away from the form?

Is there a best practice to determine whether a form is valid (not in a data
sense but in a workflow sense e.g. all required fields are entered)?

Thanks!!

McGeeky
 
B

BruceM

Use the form's Before Update event to perform validation. That will cover
almost everything. I think there are some limited circumstances under which
it is safest to take the extra precaution of explicitly saving the record
(and thus invoking the Before Update event) in the form's Unload event. I
wish I could remember more of the details of the situation, including
whether my recollection is anywhere near correct.

In general, though, I can say with confidence that the form's Before Update
event will do what you need.
 
M

McGeeky

Thank you for that Bruce. Much appreciated!

BruceM said:
Use the form's Before Update event to perform validation. That will cover
almost everything. I think there are some limited circumstances under
which it is safest to take the extra precaution of explicitly saving the
record (and thus invoking the Before Update event) in the form's Unload
event. I wish I could remember more of the details of the situation,
including whether my recollection is anywhere near correct.

In general, though, I can say with confidence that the form's Before
Update event will do what you need.
 

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