docmd.ouTPutTo

  • Thread starter Thread starter MUHAMAMD SALIM SHAHZAD
  • Start date Start date
M

MUHAMAMD SALIM SHAHZAD

i am giving command to save particular report by using

DoCmd.OutputTo acOutputReport, stA1, _
acFormatRTF, c:\myReports\test.rtf", False

it success, but i wanted to create the date now() folder and save in
c:\myReports\160703

so i try to use
MkDir ( "C:\MyReport" & Format(Now(), "ddmmyy"))

but it give me errors
"Comppile error
expected function or variable"

sowhat i wanted when any user print reports, so must save in the same
date some specific location like above c:\reports

thanks rgds
 
Hi,

try removing the outer parentheses from the statement to
read:

MkDir "C:\MyReport" & Format(Now(), "ddmmyy")

MKDir is a statement, not a function.

hth

chas
 
Back
Top