Jump to content
Sign in to follow this  
rblloyd

Creating a Validation Script???

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    adyf 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.