View Full Version : Dlookup returning Error


punter
03-12-2007, 10:48 AM
Hi,

I'm getting better at this access stuff and wanted to thank all of you in advance. I wouldn't have been able to come as far as I have if not for your time and efforts.

The attached database has a report called The Book. There is a text box named Duty. That text box should return the dollar amount of the duty for each ContainerNumber. I've been looking on the web and reading the help functions in access but I must be doing something wrong. Here is the formula I put in:

=DLookUp("[Duty]","Container_Vendor_Information","[ContainerNumber]=" & Reports![The Book]!ContainerNumber)

Any thoughts on what I'm doing wrong? Your help is always most welcome.

Thanks

Eddie

rainman89
03-12-2007, 10:51 AM
=DLookUp("[Duty]","Container_Vendor_Information","[ContainerNumber]=""" & Reports![The Book]!ContainerNumber &"" )

KeithG
03-12-2007, 10:52 AM
what data type is container number?

KeithG
03-12-2007, 10:55 AM
Why not add the Container_Vendor_Information table to your record source and get the Duty field?

punter
03-12-2007, 11:00 AM
Thank you both so much for your quick replies. It works now and I see what I was going wrong.

Eddie.