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

dlookups - is there a better way?

Status
Not open for further replies.

crabback

Technical User
Jan 29, 2007
64
IE
Hi all
I'm looking for a bit of guidance rather than an actual solution I think...
I have a number of reports written that have some very complicated calculations on them so it is impossible as far as I can see to get them into one query, and so I use dlookups on the reports for these calculations. Each calculation may contain up to 3 dlookup summed together.
The reports take a long time to run (3-5 mins on my laptop, over the network of the company I am writing it for it takes much longer): which I put down to the fact that for hundreds of records each of these calculations has to be processed - or is this an inevitable situation once there are a large number of records?
any help is much appreciated.
Thanks


Crabback
 
I rarely have to resort to DLookup() or DSum() or other. Each domain aggregate function has a domain. If this domain is the same as your report's record source then you should be able to use Sum() or another efficient expression. Often times DLookup() can be replaced by adding a table into your report's record source.

Since you haven't given an example of your expressions and reports we can't be of much more help.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top