I am trying to use the Dlookup function to validate whether or not the information typed in a text box is in a table. For example, I want to know if a specific State is in a Table. I have looked at the FAQ, but I can not seem to get this to work. Basically what I want to do for test purposes is this:
If Me.strMA_State = DLookup("[strma_state]", "tblstate_ooa_non_Contiguous") Then
MsgBox "success"
End If
this is how it reads (In my head): if State is in Table then
success.
I will go on to execute code I will write, but can not get past this trivial part as of yet
Any help with the Dlookup function is much appreciated!
If Me.strMA_State = DLookup("[strma_state]", "tblstate_ooa_non_Contiguous") Then
MsgBox "success"
End If
this is how it reads (In my head): if State is in Table then
success.
I will go on to execute code I will write, but can not get past this trivial part as of yet