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.
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.