Hey,
I don't understand why my DLookup action is throwing up a run-time 2001: "You Cancelled the previous operation"
This line in question is this one;
which comes from the following subroutine;
Can anyone help me?
I don't understand why my DLookup action is throwing up a run-time 2001: "You Cancelled the previous operation"
This line in question is this one;
Code:
BookingRefABC = DLookup("[Booking Reference]", "tblCampingBookings", "CustomerID='" & Me.Text15 & "'")
which comes from the following subroutine;
Code:
Private Sub Command4_Click()
Dim SearchTerm As String
Dim CustID As Integer
Dim BookingRefABC As String
SearchTerm = InputBox("Please enter a customers surname to search for...", "Search")
CustID = DLookup("CustomerID", "tblCustomers", "Surname='" & SearchTerm & "'")
Me.Text15 = CustID
BookingRefABC = DLookup("[Booking Reference]", "tblCampingBookings", "CustomerID='" & Me.Text15 & "'")
Me.Text17 = BookingRef
Me.frmCreditCardLookup.Requery
Me.frmCreditCardLookup.Visible = True
End Sub
Can anyone help me?