N
nevpoe
I am trying to use a lookup in my output function. However, I keep getting
"You stopped your previous command" Error. What is wrong with this?
Dim stDocName As String
stDocName = "tblAF report"
stOutputName = "P:\Gardner\common\Lab\asfired\" &
Format(DLookup("[analysis date]", "tblAF2 Query"), "mmddyyyy") & ".snp"
DoCmd.OutputTo acReport, stDocName, "Snapshot Format", stOutputName,
True, "", 0
Exit_AFSAVE_Click:
Exit Sub
Err_AFSAVE_Click:
MsgBox Err.Description
Resume Exit_AFSAVE_Click
End Sub
"You stopped your previous command" Error. What is wrong with this?
Dim stDocName As String
stDocName = "tblAF report"
stOutputName = "P:\Gardner\common\Lab\asfired\" &
Format(DLookup("[analysis date]", "tblAF2 Query"), "mmddyyyy") & ".snp"
DoCmd.OutputTo acReport, stDocName, "Snapshot Format", stOutputName,
True, "", 0
Exit_AFSAVE_Click:
Exit Sub
Err_AFSAVE_Click:
MsgBox Err.Description
Resume Exit_AFSAVE_Click
End Sub