• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1111
  • Last Modified:

DoCmd.RunCommand acCmdExport Question

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????


Private Sub ExportManualLookupLoadForm_Click()
    On Error GoTo ErrHandler
    DoCmd.RunCommand acCmdExport
    Exit Sub
    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
1 Solution
What format do you want this exported in?

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

ajslentzAuthor Commented:
I went a different route using the docmd.transfer.  Thanks for pointing me to that!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now