Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DoCmd.RunCommand acCmdExport Question

Posted on 2005-05-08
2
Medium Priority
?
1,105 Views
Last Modified: 2007-10-18
I have a form which has a button that does an export.  I have the code below.  When I click the button it attempts to export the form.  I actually need it to export a specific table called "master".  Any ideas on how to do this????

Thanks!

Private Sub ExportManualLookupLoadForm_Click()
    On Error GoTo ErrHandler
    DoCmd.RunCommand acCmdExport
ExitHandle:
    Exit Sub
ErrHandler:
    Select Case Err.Number
        Case 2501
            'Do nothing as cancel selected by user
            Resume ExitHandle
        Case Else
            MsgBox Err.Number & vbCrLf & Err.Description
            Resume ExitHandle
    End Select
End Sub
0
Comment
Question by:ajslentz
2 Comments
 
LVL 34

Accepted Solution

by:
flavo earned 1000 total points
ID: 13955303
What format do you want this exported in?

Take a look a docmd.transfer????? where ??? = Database, Spreadsheet or Text


Dave
0
 

Author Comment

by:ajslentz
ID: 13955453
I went a different route using the docmd.transfer.  Thanks for pointing me to that!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question