Hello All,
I have question about placing the date and time into the title of the report.
For example:
I send a report to a folder from my DB and looks like this.
money.snp
I want it to look like this
money 12-09-03 5:29pm.snp
Is this possible????
I hope all you DB Pro's can help me
Below is the code I tried but it provided an error.
Private Sub Command508_Click()
On Error GoTo Err_Command508_Click
Dim DateTime As Date
DateTime = Now()
DoCmd.OpenReport "money", acViewPreview, "", "", acHidden
DoCmd.OutputTo acOutputReport, "money", acFormatSNP, "K:\itd\webdocs\inbasket\business_process_dynamic\money_" & Now & ".snp"
DoCmd.Close acReport, "money_" & Now
DoCmd.Close acReport, "money"
Exit_Command508_Click:
Exit Sub
Err_Command508_Click:
MsgBox Err.Description
Resume Exit_Command508_Click
End Sub
I have question about placing the date and time into the title of the report.
For example:
I send a report to a folder from my DB and looks like this.
money.snp
I want it to look like this
money 12-09-03 5:29pm.snp
Is this possible????
I hope all you DB Pro's can help me

Below is the code I tried but it provided an error.
Private Sub Command508_Click()
On Error GoTo Err_Command508_Click
Dim DateTime As Date
DateTime = Now()
DoCmd.OpenReport "money", acViewPreview, "", "", acHidden
DoCmd.OutputTo acOutputReport, "money", acFormatSNP, "K:\itd\webdocs\inbasket\business_process_dynamic\money_" & Now & ".snp"
DoCmd.Close acReport, "money_" & Now
DoCmd.Close acReport, "money"
Exit_Command508_Click:
Exit Sub
Err_Command508_Click:
MsgBox Err.Description
Resume Exit_Command508_Click
End Sub