data type mismatch - DLookup

G

Guest

Hi all,
I am using DLookup to populate txtboxes and a combobox (fields datatype
are date/time, currency, text, and number) I got Run-time error '3464': data
type mismatch in criteria expression. Please help.

e.g.1 populate data (text) into a combobox

Me.CmbVendors.Text = DLookup("Vendor", "tblBatchOrders", "BatchNumber= '" &
[Forms]![frmbatchlog]![ListBatch] & "'")

e.g. 2 populate data (date/time) into a textbox
Me.TxtDateSent = DLookup("DateSent", "tblBatchOrders", "BatchNumber= '" &
[Forms]![frmbatchlog]![ListBatch] & "'")


Thanks,
Jeff
 
G

Guest

nvm. I got it... i am comparing a number.. not a string therefore i need to
remove the 's
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top