dynamic creation folder while preview report

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

MUHAMAMD SALIM SHAHZAD

dear sir

i wanted to create the folder of today date by default in c driver
under c:\reports folder..i hve tried mkdir, dir with vbdirectory but
did not success

Private Sub cmdReport_Click()

docmd.openreport "myreport",acpreview

DoCmd.OutputTo acOutputReport, "myreport", _
acFormatRTF, "c:\reports\myReport.rtf", False

End Sub

can anyone help me

thks and rgds bye
 
MkDir works. You are probably trying to create a folder using the date
format. This would contain illegal characters in the file / folder name.

Try something like...
MkDir "c:\reports\temp" & Format$(Date, "ddmmyy")

--

peter walker MVP

Please post replies to the news group so everyone can benefit.
www.papwalker.com
 
Back
Top