I have the following file to create an Excell Spreadsheet from and Acess Query.
Private Sub PrntXLS_Click()
If LookUp = "" Then
MsgBox "Please Select Attendee via Drop Down Menu"
Exit Sub
Else
docmd.OpenQuery "OutputXLS_qry", acViewNormal, acEdit
docmd.Close acForm, "PrintGroupReportsForm"
docmd.OutputTo acOutputQuery, "OutputXLS_qry", acFormatXLS, , True
End If
I use a Combo Box to set the criteria for the creating the Parameter Query. From there the Query is sent to the Excell creating a very good spreadsheet.
My problem is that once all the above is done, how do I close the Excell Spreadsheet I have just created as well as the query that created it.
Thank you for your help on this matter.
Robert M
Private Sub PrntXLS_Click()
If LookUp = "" Then
MsgBox "Please Select Attendee via Drop Down Menu"
Exit Sub
Else
docmd.OpenQuery "OutputXLS_qry", acViewNormal, acEdit
docmd.Close acForm, "PrintGroupReportsForm"
docmd.OutputTo acOutputQuery, "OutputXLS_qry", acFormatXLS, , True
End If
I use a Combo Box to set the criteria for the creating the Parameter Query. From there the Query is sent to the Excell creating a very good spreadsheet.
My problem is that once all the above is done, how do I close the Excell Spreadsheet I have just created as well as the query that created it.
Thank you for your help on this matter.
Robert M