A
Associates
Hi,
I was wondering if i could get some help with the form.
I'd like to be able to take the cursor back to the text-box where there is
an error. The error may be produced because the entry data doesn't satisfy
the condition.
For example, there is a textbox called age. I have the following code
Private Sub Age_Exit(Cancel As Integer)
If Me.Age < 20 Then
MsgBox "The age cannot be less than 20. Please check it again"
End If
me.Age = "" ' Clear the box
End Sub
How do i get the cursor back to the Textbox - age? i have tried to use
..setfocus but to no avail.
Thank you in advance
I was wondering if i could get some help with the form.
I'd like to be able to take the cursor back to the text-box where there is
an error. The error may be produced because the entry data doesn't satisfy
the condition.
For example, there is a textbox called age. I have the following code
Private Sub Age_Exit(Cancel As Integer)
If Me.Age < 20 Then
MsgBox "The age cannot be less than 20. Please check it again"
End If
me.Age = "" ' Clear the box
End Sub
How do i get the cursor back to the Textbox - age? i have tried to use
..setfocus but to no avail.
Thank you in advance