Creating a file with the Output To Macro

Ima90sJezus

New member
Local time
Today, 11:36
Joined
Jun 14, 2004
Messages
6
I have a Macro that outputs a report in snapshot format using the OUTPUT TO macro. I need to have a varying output file name. I would like to do this within the Macro itself. I would like to avoid using any type of Visual Basic and I would like to avoid having the end-user type it in.

I have tried various syntax (see below), and none of them work.

C:/Output/ & [Forms]![FieldName] & .snp
C:/Output/ "& [Forms]![FieldName] & ".snp
C:/Output/ ""& [Forms]![FieldName] & "".snp
"C:/Output/" & [Forms]![FieldName] & ".snp"
""C:/Output/" & [Forms]![FieldName] & ".snp""


Any other suggestions would be greatly appreciated.

TIA
 
I

=CStr("C:\Output\" & [Forms]![Form1]![txtTest] & ".snp")

Wayne
 
Thanks for the effort, but

that didn't work either.

within the Macro, the "output file" will not take the syntax with the "=", so I tried it the following ways:

=CStr("C:\Output\" & [Forms]![Form1]![txtTest] & ".snp")Will Not take

CStr("C:\Output\" & [Forms]![Form1]![txtTest] & ".snp") Doesn't Work

("C:\Output\" & [Forms]![Form1]![txtTest] & ".snp") Doesn't Work


There has to be a way to do this, any other suggestions -

Thanks
 
Here it is...

After many tries, here is the answer-

In the Output File section use the following syntax:

="C:\Output\" & [Forms]![FormName]![FileName] & ".snp"


For some reason the "=" would not take with the parenthesis...

Thanks for your help....
 

Users who are viewing this thread

Back
Top Bottom