Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLOOKUP in a report 1

Status
Not open for further replies.

mgbeye

Programmer
May 30, 2001
47
US
I am running a report that pulls its information from a query. Is it possible to do a DLOOKUP in the report to pull information from the query. Here is the syntax I have.

Code:
=DLookUp("[SUMOFQUANTITY]","REPORT","[OLD MATL] = BOT30026SS")

The fields in the query are as follows:

Query Name: Report
Material
Old Matl
Material Description
Mvt
Post Date
Quantity

Also, Will I be able to usa a DLOOKUP on a different table to pull in more information?

Thanks,
Meliss@
 
You need ' around your id because it's a string:

=DLookUp("[SUMOFQUANTITY]","REPORT","[OLD MATL] = 'BOT30026SS'")

Yes, dlookup can look up values from other tables as well.


Joe Miller
joe.miller@flotech.net
 
I made the change you suggested, but it still displays #ERROR. Is there something special you have to do to be able to use it in a report? Thanks so much for your help.
 
Your statement says "I want to lookup:"

The field SUMOFQUANTITY in the table/query REPORT where OLD MATL = 'BOT30026SS'

If that is the correct statement then make sure you don't have a control on your form named OLD MATL.

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top