O
ODR via AccessMonster.com
Hi,
Can some please shed some light on what i am doing wrong. I am outputting a
query to excel with the following code:
Private Sub cmdexcel_Click()
On Error GoTo Handle_Err
DoCmd.OutputTo acOutputQuery, "qry_firststorelst", acFormatXLS, , True
Exit_Err:
Exit Sub
Handle_Err:
Select Case Err.Number
Case 2501
' The OutputTo action was cancelled.
Resume Exit_Err
Case Else
MsgBox Err.Number & " " & Err.Description
Resume Exit_Err
End Select
End Sub
As you can see there is code for trapping the error. Unfortunately this is
not actually happening and i am still getting the runtime error.
I am using access 2003
Thanks
Can some please shed some light on what i am doing wrong. I am outputting a
query to excel with the following code:
Private Sub cmdexcel_Click()
On Error GoTo Handle_Err
DoCmd.OutputTo acOutputQuery, "qry_firststorelst", acFormatXLS, , True
Exit_Err:
Exit Sub
Handle_Err:
Select Case Err.Number
Case 2501
' The OutputTo action was cancelled.
Resume Exit_Err
Case Else
MsgBox Err.Number & " " & Err.Description
Resume Exit_Err
End Select
End Sub
As you can see there is code for trapping the error. Unfortunately this is
not actually happening and i am still getting the runtime error.
I am using access 2003
Thanks