TransferSpreadsheet/OutputTo Spreadsheet Help

J

Joe R.

I created a menu on a form with buttons to perform various
outputs. One button produces a pull down menu from a
table. Another produces reports using the OpenReport
method. With this method I can specify a criteria which
filters the report. For example I can tell the OpenReport
to produce the report for cases where a field in the
report is equal to the value in the pull down menu.

I also have a button which produces an Excel spreadsheet.
To produce this file I can use either use the
TransferSpreadsheet or OutputTo method. Niether has a
criteria provision which allows me to filter the output.
I have tried placing the doCmd.TransferSpreadsheet or
doCmd.OutputTo methods in an IF THEN statement, this
hasn't worked.

Is it possible to use the code behind my button to produce
an Excel file just for the cases where a specified field
equals the value selected in the pull down menu? If so,
how? An example of the code would be helpful.
 
E

Eric

Design a query that uses the forms pulldown menu data for
criteria. In the transferspreadsheet portion of the macro
enter the query name for the table name.

Eric
 
J

Joe R.

Thanks. It worked.
-----Original Message-----
Design a query that uses the forms pulldown menu data for
criteria. In the transferspreadsheet portion of the macro
enter the query name for the table name.

Eric

.
 

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