dynamic creation folder while preview report

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

peter walker

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
 

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