Chuck C
Senior HTF Member
- Joined
- Jan 6, 2001
- Messages
- 2,224
How do I program the OK and Cancel buttons when using the InputBox function? I keep returning an error:
right now all I have as code is
Dim strName As String
strName = InputBox("Enter StudentID", "Find StudentID")
With Adodc1.Recordset
.MoveFirst
.Find "StudentID Like '" & strName & "*'", 0, adSearchForward
my goal is to have an error message box upon clicking OK if the field is left blank and the cancel should cancel back to the form
any ideas?
thanks
right now all I have as code is
Dim strName As String
strName = InputBox("Enter StudentID", "Find StudentID")
With Adodc1.Recordset
.MoveFirst
.Find "StudentID Like '" & strName & "*'", 0, adSearchForward
my goal is to have an error message box upon clicking OK if the field is left blank and the cancel should cancel back to the form
any ideas?
thanks