Private Sub Command9_Click()
Dim reportname As String
Dim theFilePath As String
reportname = "MaxPrice"
theFilePath = "C:\Documents and Settings\" & Environ("UserName") & "\Desktop\"
theFilePath = theFilePath & reportname & "_" & Format(Date, "yyyy-mm-dd") & ".xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, reportname, theFilePath, True
MsgBox "Look on your desktop for the report."
End Sub