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

openreport not passing filter to the query

Status
Not open for further replies.

basbrian

Programmer
Feb 18, 2002
49
AU
Hi, i am having a problem with (I think) the openreport command. I am usig Access 2000 over a sql database. we are running a software package that supplies an add on that allows us to write our own reports and add them to a menu form that allows our users to select a report and to also select their where statement based on the fields in the query. in their code they setup and run an openreport command.
I have written a query that has a function in it.(i wrote a function to get the first record ) the query is based on the meter table, gets the latest consumption record then based on the record number of the consumption record gets the consumption record.
when I run just the query by entering a meter number in the meter field, the result is returned instantly
when i run it thru the menu and select one meter no, (in debug) it runs the function for every meter number and then returns to the report with a report for the meter i entered. this is very slow

it seems as if the openreport runs the full query then filters the data on the whereis statement.

is there a way around this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top