Input Message Box

IanT

Registered User.
Local time
Today, 20:13
Joined
Nov 30, 2001
Messages
191
I am using Input Message Box to obtain filter data. Is it possible to catch when someone uses the cancel button on the input box. If cancel is used I would like to responed with code a message box for example!
 
cancel will return an empty string same as if the leave it blank and click OK so just test for ""

HTH

Peter
 
Yes Peter is correct, mind you, in case this is relavent, pressing Ok, with no response will also return "". So to differentiate, more precisely...

If vbCancel = InputBox("Pick Number From ....",vbOkCancel) Then
....

or

Dim varResponse As Variant

varResponse = InputBox "Pick Number From ....",vbOkCancel

Select case varResponse
Case vbCancel
MgBox "You Must Reply by...
Case vbOk
Docmd.Open....
End SElect
 

Users who are viewing this thread

Back
Top Bottom