Hi
From a form, I want the user to be able to send an xls/rtf file, something like
If Msgbox("Click Yes to send as a Text file." & Chr(13) & "Click No to send as a spreadsheet", vbYesNo + vbQuestion, "Send file" = vbYes Then
DoCmd.SendObject acSendQuery, "output", acFormatRTF, , , , "e-government report"
Else
DoCmd.SendObject acSendQuery, "output", acFormatXLS, , , , "e-government report"
End If
Output is the name of a query.
The problem I've got is that the user may want to filter the records on the form. When they click the command button to export, I want the query to be filtered also
any ideas?
Regards
Gareth
From a form, I want the user to be able to send an xls/rtf file, something like
If Msgbox("Click Yes to send as a Text file." & Chr(13) & "Click No to send as a spreadsheet", vbYesNo + vbQuestion, "Send file" = vbYes Then
DoCmd.SendObject acSendQuery, "output", acFormatRTF, , , , "e-government report"
Else
DoCmd.SendObject acSendQuery, "output", acFormatXLS, , , , "e-government report"
End If
Output is the name of a query.
The problem I've got is that the user may want to filter the records on the form. When they click the command button to export, I want the query to be filtered also
any ideas?
Regards
Gareth