Simple Form Validation

mparker1113

New member
Local time
Today, 07:36
Joined
Jun 27, 2005
Messages
8
When user submits record on form, by pushing the arrow to move forward to new form, or back to previous ones, I would like to ensure that they have met a specific criteria in some fields.

How can I catch this without using VB Access? I can use VB Access, but would like to know how "normal" users would force form validation.

Much appreciation for lesson.

-Mike
 
Okay, how can I catch this with VB?

I have code in the Form_BeforeUpdate() but that is not preventing the user from submitting with wrong data in field.

Code:
 [Number of Bedrooms].SetFocus
 If (CInt([Number of Bedrooms].Text) < 1) Then
 MsgBox ("You need to enter 1 or more bedrooms")
 End If
There is validation at the [Number of Bedrooms] field, that requires a number > 0. But, the user can click twice on the arrow to move to next form, and their wrong form is saved.
 
Perhaps you could remove the Access controls and install your own command buttons with the code in the onclick event of the buttons used for navigation.
 
No, I really would like to use the existing format. Is there anyway to catch the click of the default form buttons ? or to prevent the form from being submitted (so that when I catch the form_beforeUpdate, i can say don't submit the form if they aren't validateable...
 

Users who are viewing this thread

Back
Top Bottom