Hi guys i have the following code in VB access which is working fine for me. It creates a PDF perfectly but i need to use some naming convention for the PDFs. i want to be able to capture the current date and time in VB and use that as part of the name. Im using Now function for that purpose but its not giving me the right results. Any ideas of how i can achieve the following. Names for pdf files should be the account name , then report date and then they current date and time. Thanks u all for u help..
Private Sub cmd_pdf_Click()
stracct = Forms![Mainform]![cbo_ParentAccounts].Value ---account name combo (works)
strenddt = Forms![Mainform]![cbo_reportenddt].Value --doesn't work
strcurdt = Now() --doesn't work
'Exporting to PDF
'Defines report's format type
Me.crxreport.ExportOptions.FormatType = crEFTPortableDocFormat
'Defines report's destination type
Me.crxreport.ExportOptions.DestinationType = crEDTDiskFile
'Defines report's file name
Me.crxreport.ExportOptions.DiskFileName = "\\Myreports\Reports2006\" & stracct + strenddt + strcurdt & ".pdf"
Me.crxreport.Export False
Private Sub cmd_pdf_Click()
stracct = Forms![Mainform]![cbo_ParentAccounts].Value ---account name combo (works)
strenddt = Forms![Mainform]![cbo_reportenddt].Value --doesn't work
strcurdt = Now() --doesn't work
'Exporting to PDF
'Defines report's format type
Me.crxreport.ExportOptions.FormatType = crEFTPortableDocFormat
'Defines report's destination type
Me.crxreport.ExportOptions.DestinationType = crEDTDiskFile
'Defines report's file name
Me.crxreport.ExportOptions.DiskFileName = "\\Myreports\Reports2006\" & stracct + strenddt + strcurdt & ".pdf"
Me.crxreport.Export False