OutputTo command

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
L

Leslie Isaacs

Hello All

I am using A97.
I want to output a report to a particular folder (on our fileserver), with
the choice of folder being determined by specified combo-box (called
[prac_name]) and a specified text box (called [Practice_ID]) - both of which
are on the current form.

e.g. if
combo-box value is "Parson Drove Surgery"
text-box value is "18000"

the report need to be output to the following folder:

\\Server\Payedoc programmes\Clients\18000 - Parson Drove Surgery

.... but I can't see how to include the combo-box and text box values in the
path name: can this be done?

Hope someone can help.

Many thanks
Leslie Isaacs
 
The folder has to exist prior to outputing the file, once the folder exists
add this to your form

strPath = " \\Server\Payedoc programmes\Clients\" & me.mytextbox & " - " &
me.MyComboBox

DoCmd.OutputTo acOutputReport, "My_Report", acFormatXLS, strPath
 
Leslie,

In the Output File argument of your OutputTo macro action, enter like
this...
="\\Server\Payedoc programmes\Clients\" & [Practice_ID] & " - " &
[prac_name] & "\YourFile.snp"
 
Back
Top