tags:

views:

25

answers:

1

Here is my dlookup function:

DlookUp("IsVague", "CommodityType", "Description = " & newItem)

newItem is a variable that contains "in it in list". The datatype for the description field is varchar(50). The dlookup function is giving me an error: Incorrect syntax near the keyword "is".

What could be wrong?

+1  A: 

You probably need single quotes around the value of newItem. Try:

DlookUp("IsVague", "CommodityType", "Description = '" & newItem & "'") 
froadie