exporting query with parameter

  • Thread starter Thread starter Brunner
  • Start date Start date
B

Brunner

I have a procedure in the access' module and I want it to export a query to
an xls file:



but the problem is that it must be exported with parameter (ex. date range).
And that's the problem:

"How to export query with parameter?"



Any ideas?



Brunner
 
If you are exporting query RESULTS, simply run the code and answer the
question.

As an alternative, use a text box on a form as your parameter and fill it in
before pushing a button to run the code.

Bob
 
bob w (news:%[email protected]) napisa³(a):
If you are exporting query RESULTS, simply run the code and answer the
question.
As an alternative, use a text box on a form as your parameter and fill
it in before pushing a button to run the code.
Bob


yes, that's clear but I have about 8 queries to export with the same
parameter, so answering 8 times the same question is not a very good idea.

Brunner
 
Brunner,

I am pretty sure Bob's suggestion would specifically bypass this
problem. He was suggesting *not* using parameter queries. If you enter
the criteria into a textbox on a form, and then replace the parameter
prompt in the query criteria with a reference to the textbox, using
syntax such as:
[Forms]![NameOfForm]![NameOfTextbox]
.... then you will not have to answer 8 times - you just enter the
criteria once, and all 8 queries will use it.
 
Steve Schapel w (news:[email protected]) napisal(a):
Brunner,
I am pretty sure Bob's suggestion would specifically bypass this problem.
He was suggesting *not* using parameter queries. If you enter the
criteria into a textbox on a form, and then replace the parameter prompt
in the query criteria with a reference to the textbox, using syntax such
as:
[Forms]![NameOfForm]![NameOfTextbox]
... then you will not have to answer 8 times - you just enter the criteria
once, and all 8 queries will use it.

yes, I've found it out too. Thank you for answering.

Brunner
 
Back
Top