|
-
Nov 20th, 2000, 10:23 AM
#1
Thread Starter
Addicted Member
what could i add to this so if the user presses the cancel button, the program exits the sub. B/c in my program, if the user pressed cancel, it jumps down to the message where it says the truck doesn't exist, i dont want that. thanks
Private Sub cmdFind_Click()
Dim newTruck As String
' Get truck number from user, via InputBox
cmdFirst_Click
newTruck = InputBox("Which truck number would you like search for?")
adTruck.Recordset.Find "NewTruckNumber = '" & newTruck & "'"
If adTruck.Recordset.EOF Then
MsgBox ("Truck number does not exist does not exist!")
cmdFirst_Click
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|