Either I’m tired or dumb.. Not sure which.. But I would like to have the If MsgBox part of this code to loop.. It works fine if you enter the wrong receipt# the first time but then nothing.. Any help is appreciated.. Thanks..
Private Sub HiddenTextbox_KeyPress(Cancel As Integer)
Me.RecordSource = BuildDataEntry()
If Me.RecordsetClone.RecordCount = 0 Then
Cancel = True
If MsgBox(“Receipt# Not Found, Click Ok To Enter A New Receipt# Or Cancel To Stop.”, vbExclamation + vbOKCancel, “IDC Receipt System Message:”) = vbOK Then
Me.RecordSource = BuildDataEntry()
End If
Else
DoCmd.CancelEvent
End If
Exit Sub
End Sub
-
Loop statement
- This topic has 2 replies, 2 voices, and was last updated 24 years, 5 months ago.
AuthorViewing 0 reply threadsAuthorViewing 0 reply threads