Exporting Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have Access 2007 - when I export a query into Excel, it will come up and
ask me for the parameter values again. For example, if the query prompted me
to put in a date, then the query would run, but when I go to export it, it
comes up and asks for the date again.

It does export correctly, I was just wondering if I could fix this prompt.
Thanks!!
 
I assume that the parameters are ones that you manually enter, right? Can
you redo your database so that the query reads the parameters from textboxes
on an open form?
 
Ken,
What you are saying will eliminate the extra keying in of the
parameters, but is there a way to skip the rer-running of the query? The
results of the query have been found and sitting in memory somewhere. So why
does access waste more cpu and resources re-running the query to execute the
export? or the same with a report that I run and then after I have previewed
the results on the screen I hit the print button and access re-runs the
query/report again to send it to the printer? When I am dealing with a large
amount of data/processing time, I would like to say to access don't re-run,
just do the export or print with what I am seeing on my screen.

Is there a magic switch or just hope for access8 to solve this waste of
resources?

Thanks,
Steve
 
ACCESS always reruns a query to get the data when you do something different
with it. The query's records are not stored in a table where you can 'reuse'
them unless you program ACCESS to do that, and even then you again will need
to run a query to get the records from that table for use.

The behavior that you're observing is "standard feature" for ACCESS.
 
Ken,
True that is "standard feature" for Access. But what I am trying to
get at is that nothing has changed since I previewed the report 2 seconds
before clicking on the print button, so why not just print the same stuff
that is on my screen to the printer and save resources? And actually if I
was in a true muti-user situation and someone else could be changing the
data, I guess I would be upset that after seeing the $ and then printing the
report the $ was different, It would be very confusing to a user and for me
to have to explain what u see is not what u get, all the time.
And I bet there is a temp table holding the data that I am viewing on my
screen, that if access was programmed with a option setup switch, to not
re-run queries/reports and just print from the temp table as it is (I guess
you could put a time difference or warning message that time has elapsed
since the temp file was created/query originally ran, would you like to
re-run and then print?

Thanks I am just dreaming too much and trying to make life too easy for my
users.

Though maybe I am trying to plant a seed for a future access release option
too.

Thanks for your response
Steve
 
I guess I am not sure of the question you asked - how would I redo the
database so that the query reads the parameters from textboxes on an open
form?
The parameter values would be different each time I run the query - for
example, I may be looking at information from 5 different invoices and I run
the query by invoice number. I manually input the invoice number and the
query runs.
 
I guess I am not sure of the question you asked - how would I redo the
database so that the query reads the parameters from textboxes on an open
form?
The parameter values would be different each time I run the query - for
example, I may be looking at information from 5 different invoices and I run
the query by invoice number. I manually input the invoice number and the
query runs.

If you have a Form (frmCrit let's call it) with a combo box (cboInvoice) that
lets you select an invoice ID, you can use a criterion of

=[Forms]![frmCrit]![cboInvoice]

This lets you *select* an invoice from a list rather than typing one in
(risking errors in typing and annoying the users). You can put code in the
combo box's AfterUpdate event to launch the report to print out the invoice -
makes it really easy, select an invoice, press enter, invoice prints!

John W. Vinson [MVP]
 
Back
Top