Disregard... figured it out by taking a round about way of doing it...
Dim objExcel As Object
Dim sqlStr As String
Dim objWBs As Object, objXLWB As Object
sqlStr = "SELECT * INTO TempReport FROM Table_Name WHERE cell = val"
'Insert data into a temporary table, then output the file to an xl file.
DoCmd.RunSQL (sqlStr)
DoCmd.OutputTo acOutputTable, "TempReport", acFormatXLS, "output.xls"
DoCmd.RunSQL ("DROP TABLE TempReport")
'Open said excel file...
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWBs = objExcel.Application.Workbooks
objWBs.Open FileName:="output.xls", UpdateLinks:=1
|