rblloyd Posted May 1, 2007 Posted May 1, 2007 I have a form in my database that is used to gather quite a bit of information. If I wanted to create a script that would check key fields that might have been left blank during the data entry process, what would be the best way of going about it? Thanks for your help!
bcooney Posted May 1, 2007 Posted May 1, 2007 You must be sure that there is only one way off the form, and that button will run your validation script. So, I'd suggest that the form is a popup window. For example: 1. User clicks "Enter Data" button which does a new window and switches to the form layout, does a new record and pauses so that the window is modal (they can't click the window that is behind. 2. The form window has two buttons "Save" and "Cancel" and each is set to Exit the current script (remember you're in a pause). "Cancel" deletes the new record and closes the window--no validation, obviously. 3. "Save" runs your validation script. Simply do a series of If End statements, such as: If ( isempty( Name)) Show Custom Dialog [ Please enter a value for Name] Exit Script End If If ( another validation calc) Exit Script End If Commit Records (no dialog) Close Window
Recommended Posts
This topic is 6417 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now