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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLookup function

Status
Not open for further replies.

primerov

Technical User
Aug 16, 2002
160
BG


In the ControlSource of a text box in a report i have tried the following DLookup function:

'=DLookup("grade", "OutVa", "productid = " & productid)
With the above function i wanted to pull the field "grade" from the query "OutVa" having the same ProductID number.The productID number exists both in the
query and the report.

However on opening the report i receive the message "Enter parameter value"

Can somebody help me ?
 
It probably doesn't say Enter Parameter Value exactly. What does it say exactly. That may tell us what value it is bombing on.

Paul
 
is productid the name of the textbox or is it the name of a field in the table "What a wonderfull world" - Louis armstrong
 
if the productid is a Number Type field field and located on your form the code should be

=DLookup("grade", "OutVa", "productid = " & me.productid)

if the productid is a Text Type Field field on you form the code should be

=DLookup("grade", "OutVa", "productid = """ & me.productid & """")

Pierre
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top