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

params passed to... DLookUp or DCount.....?

Status
Not open for further replies.

rdjohnso

Programmer
Mar 30, 2001
67
US
2 part question....

I have setup a Query: "rdqry_AvgRate"
screenshot at:

Question 1) in the query I am requiring a parameter "[Org]"
Can I pass this param in my lookup in my cell property.
If I cant, how do I get a param to the query form the Function call?

Question 2) I am trying to figure out if I use DLookup() or
DCount() for each of my cells to get the AvgRate I need.
Which of these do I use and what syntax?

?? =DLookUp("[AvgRate]","rdqry_AvgRate","Org='GWHIS'")
?? =DLookUp("[AvgRate]","rdqry_AvgRate","[Org]='GWHIS'")
?? =DCount("*","rdqry_AvgRate","Org='GWHIS'")
 
The parameter you require will not be set in the DLookup. So use the field name that you are using [Org] to filter. If that field is the Org Field, then the first syntax is correct. DCount will just provide the count of records within the specified criteria.
 
I don't think you may use any domain aggregate function against a parametized query.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Stix4t2... The actual field in the dbtable is called 'Organization'...... the param set in the
query (used in the DLookup) is called Org...
so which do I use.. what might be the syntax?

PHV.... Not sure I follow your response.

Thx

Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top