I'm trying to determine that a record on a form is in a another table. However when I run a command, I know that the record is not in the table, the msgbox says it exists. My question is - 1. Is this code correct for the DLookup, can you check more than one value for a record?
Criteria = "[tblEx2MFRAME]![GMIN] = '" & Forms![frmP6abViewActive]![subfrmP6ABViewActive].Form![GMIN] & "' AND [tblEx2Mframe]![APPL_DATE] = " & Forms![frmP6abViewActive].Form![txtFormatAPPDATE] & ""
If IsNull(DLookup("GMIN", "tblEx2MFrame", [Criteria])) Then
MsgBox ("exist")
Else
MsgBox ("Does not Exist")
End If
Thanks!
![[ponytails] [ponytails] [ponytails]](/data/assets/smilies/ponytails.gif)
Criteria = "[tblEx2MFRAME]![GMIN] = '" & Forms![frmP6abViewActive]![subfrmP6ABViewActive].Form![GMIN] & "' AND [tblEx2Mframe]![APPL_DATE] = " & Forms![frmP6abViewActive].Form![txtFormatAPPDATE] & ""
If IsNull(DLookup("GMIN", "tblEx2MFrame", [Criteria])) Then
MsgBox ("exist")
Else
MsgBox ("Does not Exist")
End If
Thanks!
![[ponytails] [ponytails] [ponytails]](/data/assets/smilies/ponytails.gif)