Garren.Shannon
Member
- Local time
- Today, 09:28
- Joined
- Sep 22, 2022
- Messages
- 113
Hey all,
Still working on a ridership database and doing entry checking. I have DepartTime and ReturnTIme. The DepartTime must be > zero. When the user puts in Return time, I am checking to see if it is > DepartTime with the following AfterUpdate code entered. The check works but if they do put in an earlier time that the depart time, the focus changes to the next tab field. How can I set the cursor back to the ReturnTime field to be corrected?
I tried Me.ReturnTime.SetFocus but it returns an error about not the correct method.
Private Sub Return_AfterUpdate()
If Me.ReturnTime < Me.DepartTime Then
MsgBox "Return time can not be before Depart time. Please check your entries.
End If
End Sub
Thanks in advance...
Still working on a ridership database and doing entry checking. I have DepartTime and ReturnTIme. The DepartTime must be > zero. When the user puts in Return time, I am checking to see if it is > DepartTime with the following AfterUpdate code entered. The check works but if they do put in an earlier time that the depart time, the focus changes to the next tab field. How can I set the cursor back to the ReturnTime field to be corrected?
I tried Me.ReturnTime.SetFocus but it returns an error about not the correct method.
Private Sub Return_AfterUpdate()
If Me.ReturnTime < Me.DepartTime Then
MsgBox "Return time can not be before Depart time. Please check your entries.
End If
End Sub
Thanks in advance...