Hello,
I am creating a form that looks up the value of a field on a table that matches two criteria on my form.
My table [partstore] has three fields, [binid], [pid] and [qty] their values are L01-01-03, 2 and 3
my form [takeapart] (For this question) has two text boxes [psid] and [pid]. the values entered into the forms are L01-01-03 and 2
I'm trying the following code in a button,
When I run this I get "Invalid use of Null"Code:Dim getbqty As Integer getbqty = DLookup("[qty]", "[partstore]", "[pid]=[Forms]![takeapart]![pid] AND [binid]='" & [Forms]![takeapart]![psid] & "''") MsgBox getbqty
When I go to immediate mode to debug it, running the dlookup with just the pid = forms pid works but trying the binid to psid comparison always results in a null?
What am i doing wrong?
Ted