M
mel
Hi there I would be extremely grateful if someone could point me in the right
direction - I am trying to display a message for when existing data is
entered: I keep getting error messages such as "you canceled the previous
operation"
Private Sub bkng_number_BeforeUpdate(Cancel As Integer)
Dim ians As Integer
If (IsNull(DLookup("[bkngnmbr]", "bookings", "[bkngnmbr] = " &
Me.bkng_number))) Then
ians = MsgBox("Booking number Already Exists! OK to Amend?," & vbCrLf & "OK
to Amend?," & "Cancel to enter New Booking Number", vbOKCancel)
Cancel = False
If ians = vbCancel Then
Me.Undo
Else
Me!bkngnmbr.Undo
'me!bkngnmbr.setfocus
Exit Sub
End If
End If
direction - I am trying to display a message for when existing data is
entered: I keep getting error messages such as "you canceled the previous
operation"
Private Sub bkng_number_BeforeUpdate(Cancel As Integer)
Dim ians As Integer
If (IsNull(DLookup("[bkngnmbr]", "bookings", "[bkngnmbr] = " &
Me.bkng_number))) Then
ians = MsgBox("Booking number Already Exists! OK to Amend?," & vbCrLf & "OK
to Amend?," & "Cancel to enter New Booking Number", vbOKCancel)
Cancel = False
If ians = vbCancel Then
Me.Undo
Else
Me!bkngnmbr.Undo
'me!bkngnmbr.setfocus
Exit Sub
End If
End If