L
Lauren B
I am attempting to code my form so that if a user enters a Customer ID
already in use, they will get a message box that tells them immediately
after leaving the corresponding text box. (as opposed to getting an error
message when attempting to save the entry after fully completing the form).
I following codes in the before update property of the text box
("TxtBxCustomer_ID"):
DLookUp ("Customer_ID" , "Table1" , Customer_ID = " ' " &
Me.TxtBxCustomer_ID & " ' " then Msgbox "Duplicate entry. Please make a new
selection."
and
If not IsNull(DLookUp ("Customer_ID" , "Table1" , Customer_ID = " ' " _
& Me.TxtBxCustomer_ID & " ' " ) then
Msgbox "Duplicate entry. Please make a new selection."
Cancel = True
End If
Neither of these codes are working. I am not getting an error message, it
just simply is doing nothing. How can I get either of these codes to work
properly.
Thank you for any assistance.
LB
already in use, they will get a message box that tells them immediately
after leaving the corresponding text box. (as opposed to getting an error
message when attempting to save the entry after fully completing the form).
I following codes in the before update property of the text box
("TxtBxCustomer_ID"):
DLookUp ("Customer_ID" , "Table1" , Customer_ID = " ' " &
Me.TxtBxCustomer_ID & " ' " then Msgbox "Duplicate entry. Please make a new
selection."
and
If not IsNull(DLookUp ("Customer_ID" , "Table1" , Customer_ID = " ' " _
& Me.TxtBxCustomer_ID & " ' " ) then
Msgbox "Duplicate entry. Please make a new selection."
Cancel = True
End If
Neither of these codes are working. I am not getting an error message, it
just simply is doing nothing. How can I get either of these codes to work
properly.
Thank you for any assistance.
LB