Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Query to Desktop

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi,

I have a requirement to export an access query to the desktop where MYOB can link via software.

I have created a command button on a form with this code
Code:
Private Sub PostInvoices_Click()
On Error GoTo Err_PostInvoices_Click

    Dim stDocName As String

    stDocName = "QSendInvoices"
    DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_PostInvoices_Click:
    Exit Sub

Err_PostInvoices_Click:
    MsgBox Err.Description
    Resume Exit_PostInvoices_Click
    
End Sub
How can I change this code to export this query to the desktop.

Many thanks,

kp

 
You do not need to open the query. In the help review: Docmd.OutputTo acOutputQuery.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top