refering to variables

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hello. I would like to change the following from

If inlist = IsNull(DLookup("[CreditorName]", "tblCreditorName",
"[CreditorName]= " & "cbocreditor.Text")) Then

to

(same code except using a variable instead of control name at the end)

If inlist = IsNull(DLookup("[CreditorName]", "tblCreditorName",
"[CreditorName]= " & "strCreditor")) Then

Could someone please tell me the combination of; " ' or () to use?
 
If inlist = IsNull(DLookup("[CreditorName]", "tblCreditorName",
"[CreditorName]= " & Chr$(34) & cbocreditor.Text & Chr$(34))) Then


If inlist = IsNull(DLookup("[CreditorName]", "tblCreditorName",
"[CreditorName]= " & Chr$(34) & strCreditor & Chr$(34))) Then

Chr$(34) is the same as "
 
Back
Top