Create a query and call it: work022806
Then create a command button, name it: export2xls
Make sure to use transferspreadsheet in the Caption under format in the
button property.
Create an OnClick event procedure use the bellow
Use this
Private Sub export2xls _Click()
On Error Resume Next
If Me.RecordsetClone.RecordCount > 0 Then
DoCmd.OutputTo acOutputQuery, " work022806", acFormatXLS
Else
MsgBox "No Record to Show, Cancelled Operation"
Cancel = -1
End If
End Sub
If there is no data, you will get the above message; otherwise you will get
an output of your report, select a location and save it.
Best of luck,