Hi,

I know that a lot about Dlookup has been written, but I struggle to compile a code with two criteria.
Example, these two codes work separately just fine.

DebitF = DLookup("Credit", "qryGeneralLedger", "CustCodeF = " & CustCode)
DebitF = DLookup("Credit", "qryGeneralLedger", "ReferF = '" & Refer & "' "
)

However I want to put both two criteria in once code something like the one shown below with reported Error 'Run-time error '13':

DebitF = DLookup("Credit", "qryGeneralLedger", "CustCodeF = " & CustCode And "ReferF = '" & Refer & "' ")


Just to add note:
Cust code is Numeric value
Refer is text value

Thanks in advance for help!