Question on parameter query?

L'apprentis

Redcifer
Local time
Today, 09:02
Joined
Jun 22, 2005
Messages
177
I have been searching the web for quite a while now and I can't find any solution to my problem or my question if you prefer.
I have got a query that runs with several parameters and return a single value. I wanted to know if it was possible to link that query to a single text box in a form and return the results when the form was loaded (The parameter would be equal to values taken from other textbox on he same form)

If anybody can help me out or advise me a good link I would be gratefull,

Thanks,
Fred,
 
Thanks Scott,
That was exactly what i was looking for.
I was stuck for a little while because the query i was looking up was returning a sum and the look up function didn't seem to work that way. I, then, included the sum function in the lookup parameter and it 's working fine. Sorry for the late reply though.

PS: On the same form, I am using several time the dlookup function on the same query with different parameter. Is there any danger using that method?
 
Domain Aggregate functions (of which DLookup is one) work kinda slowly. Instead of using them, couldn't you use a GroupBy query to display sums grouped by a field in your table? then you can just display the whole query in a subform.
 
I am sure I could but my system is quite complex and it is quite important that the summed values are return automaticly depending on two parameter visible on the open form. I mean even if aggregate functions are a bit slower, it seems that there easier to use and work fine for that purpose. What do you think?
 
L'apprentis said:
I am sure I could but my system is quite complex and it is quite important that the summed values are return automaticly depending on two parameter visible on the open form. I mean even if aggregate functions are a bit slower, it seems that there easier to use and work fine for that purpose. What do you think?

If the parameters are different, then what you are doing is probably the best. If the parameters were the same then the Group by would be better.
 

Users who are viewing this thread

Back
Top Bottom