Parameter query

border20

Registered User.
Local time
Today, 23:06
Joined
Jan 8, 2003
Messages
92
I need to export a parameter query ...

I have the folowing code:

DoCmd.TransferSpreadsheet acExport,8,"queryname", "C:\test.xls"

Then i am prompted for the parameters.... but is there a way to enter the parameter in a form... example... I would choose the parameter from a list... and then press export and I would not get prompted for the parameters...

thx
 
Add a condition to your query "queryname" so you refer to the "list" on your form.

The new query would be something like:

SELECT column1, column2
FROM yourtable
WHERE.....

(new part)

AND column2 = Forms!YourFormName!YourComboListName

RV
 
border20,

following RV's advice, create a query and in the criteria box of the value you need to enter, add something like:


"[Please enter value]"

the " " don't go there but the [ ] are crucial.
But is this what you didn't want?
I'm confused!

Just trying to help!

Regards,
Abhi
:)
 

Users who are viewing this thread

Back
Top Bottom