docmd.ouTPutTo

  • Thread starter MUHAMAMD SALIM SHAHZAD
  • 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
 
C

chas

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
 

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