After I run this code my object query get completly wiped out (as in the SQL gets deleted). I have no clue why this happens, Here is my code... help!
Code:
Private Sub Print_Click()
If IsNull(MachineBox) Then
MsgBox "Please select a machine"
Else
DoCmd.OutputTo acQuery, "MachinePrintOut", "MicrosoftExcelBiff8(*.xls)", "", False, "", 0
End If
End Sub