I have used the code below to run a report to our server. I need to change the file name each time to be date specific. When I run the code I get run time error 3011 - Microsoft Jet Database Engine could not find object".
When I get that solved - the query that the report runs from requires a date input which should be yesterdays date - what line of code can I enter to do that.
Private Sub Option7_Click()
Dim outputSNP As Variant
outputSNP = "j:\umps\this week\" & "Clock Hours for-" & Format(Now(), "yyyymmdd") & ".snp"
DoCmd.OutputTo acReport, "DailyClockReport -All Employees", acFormatSNP, outputSNP, False
MsgBox "the report is published to " & outputSNP
End Sub
Thanks
When I get that solved - the query that the report runs from requires a date input which should be yesterdays date - what line of code can I enter to do that.
Private Sub Option7_Click()
Dim outputSNP As Variant
outputSNP = "j:\umps\this week\" & "Clock Hours for-" & Format(Now(), "yyyymmdd") & ".snp"
DoCmd.OutputTo acReport, "DailyClockReport -All Employees", acFormatSNP, outputSNP, False
MsgBox "the report is published to " & outputSNP
End Sub
Thanks