K
Kim
I have a form. From the form I want to be able to save
the report to a file based on certain criteria.
Below is the code that I currently have but when I try to
run it I get this error message " The format that you are
trying to out put is not currently available".
Private Sub cmdSave1_Click()
On Error GoTo Err_cmdSave1_Click
Dim strwhere As String
strwhere = "[bsdirID] = " & bsdirID
Dim stDocName As String
stDocName = "rptBattleStaffDirectives"
DoCmd.OutputTo acOutputReport, stDocName, acPreview,
strwhere
Exit_cmdSave1_Click:
Exit Sub
Err_cmdSave1_Click:
MsgBox Err.Description
Resume Exit_cmdSave1_Click
End Sub
Does the report have to be open before you can e-mail it
or save it to a file?
Thank you.
..
the report to a file based on certain criteria.
Below is the code that I currently have but when I try to
run it I get this error message " The format that you are
trying to out put is not currently available".
Private Sub cmdSave1_Click()
On Error GoTo Err_cmdSave1_Click
Dim strwhere As String
strwhere = "[bsdirID] = " & bsdirID
Dim stDocName As String
stDocName = "rptBattleStaffDirectives"
DoCmd.OutputTo acOutputReport, stDocName, acPreview,
strwhere
Exit_cmdSave1_Click:
Exit Sub
Err_cmdSave1_Click:
MsgBox Err.Description
Resume Exit_cmdSave1_Click
End Sub
Does the report have to be open before you can e-mail it
or save it to a file?
Thank you.
..