Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Code to prevent blank fields in form when exiting

Code to prevent blank fields in form when exiting

Code to prevent blank fields in form when exiting

I'm trying to tidy up a collegue's database he has written.
What I'd like is for when the user clicks onto form 2, which in turn closes form 1, it won't allow form 1 to close if there are ANY blank fields. i.e. The user must enter a number in EVERY field
I tried changing all field required properties to Yes, but it doesn't like it, so I need something that will work on a form. Maybe something on the afterupdate event of each field??
Help/code much appreciated

RE: Code to prevent blank fields in form when exiting

Hi Richie,

This is something that i have found difficult, seems like any traps are ok while the form has focus but all processing transfers to the next form that has focus.

a rather simplistic approach might be to make the the form modal. disable any exit's from the form until all fields have been entered. then allow the app to close the form in question and then move to the next form.


Robert Dwyer

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close