hi,
I'm sure there is a simple answer out there somewhere.
I am trying to use the Dlookup function with 2 criteria. It works fine, but one of my criteria is optional (Me.txtItem).
I can only get it to work when the user selects BOTH criteria.
Here is my code:
Thanks in advance.
I'm sure there is a simple answer out there somewhere.
I am trying to use the Dlookup function with 2 criteria. It works fine, but one of my criteria is optional (Me.txtItem).
I can only get it to work when the user selects BOTH criteria.
Here is my code:
Code:
tmpID = Nz(DLookup("id_punchlist", "tblPunchlistData", "system = '" & Me.cboSystem & "' and item_no = " & Me.txtItem), "0")
Thanks in advance.