OutputTo command

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
 
J

jl5000

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
 
S

Steve Schapel

Leslie,

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

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