Paul Cooke
Registered User.
- Local time
- Today, 15:49
- Joined
- Oct 12, 2001
- Messages
- 288
Hi Not sure i this is an easy one or not but I have no idea how get around it
I have for form with a required control "Gender"
The following code is under the BeforeUpdate event
What is happening is that when the user inputting details innto the form gts to the last field (without entering a gender) i get the default error message "you must enter a value...."
Is it possible to stop the user from going past the gender control until something is input into it? And how do I change / stop the default message
from popping up?
Many thanks for any advice or solutions you can offer
Paul
I have for form with a required control "Gender"
The following code is under the BeforeUpdate event
Code:
Private Sub PatientGender_BeforeUpdate(Cancel As Integer)
Dim strMsg As String, strTitle As String
Dim intStyle As Integer
If IsNull(Me!PatientGender) Or Me!PatientGender = "" Then
strMsg = "Please select a gender"
strTitle = "Choose Gender"
iniStyle = vbOKOnly
MsgBox strMsg, iniStyle, strTitle
Cancel = True
End If
End Sub
What is happening is that when the user inputting details innto the form gts to the last field (without entering a gender) i get the default error message "you must enter a value...."
Is it possible to stop the user from going past the gender control until something is input into it? And how do I change / stop the default message
from popping up?
Many thanks for any advice or solutions you can offer
Paul