OutputTo Macro

G

grantschneider

IO have created an output macro that runs a query and exports the
query to Excel. I use a form with a drop down list to set the
parameters for the query. I have tried to make it so that the filename
automatically becomes the field that is selected from the drop down
list by putting:

Outputfile: [Forms]![VPNames]![Enter VP Name].xls

This doesnt work. Is there another way or am I missing something?
 
G

grantschneider

Outputfile: [Forms]![VPNames]![Enter VP Name] & ".xls"
I tried this (by copy and pasting what was posted above:
IO have created an output macro that runs a query and exports the
query to Excel. I use a form with a drop down list to set the
parameters for the query. I have tried to make it so that the filename
automatically becomes the field that is selected from the drop down
list by putting:
Outputfile: [Forms]![VPNames]![Enter VP Name].xls
This doesnt work. Is there another way or am I missing something?- Hide quoted text -

- Show quoted text -

Tried this. Doesn't seem to work. I get [Forms]![VPNames]![Enter VP
Name] as the file name.
 
K

Ken Snell \(MVP\)

You're using this as the argument, right? -- add an = sign at the beginning:

=[Forms]![VPNames]![Enter VP Name] & ".xls"

--

Ken Snell
<MS ACCESS MVP>




Outputfile: [Forms]![VPNames]![Enter VP Name] & ".xls"
I tried this (by copy and pasting what was posted above:
IO have created an output macro that runs a query and exports the
query to Excel. I use a form with a drop down list to set the
parameters for the query. I have tried to make it so that the filename
automatically becomes the field that is selected from the drop down
list by putting:
Outputfile: [Forms]![VPNames]![Enter VP Name].xls
This doesnt work. Is there another way or am I missing something?- Hide
quoted text -

- Show quoted text -

Tried this. Doesn't seem to work. I get [Forms]![VPNames]![Enter VP
Name] as the file name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top