Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Unanswered: Converted Export Macro Problem

    Hello,
    I have created an export macro in Access2000 and converted it to a module for use in an existing VB project. When I add the module to the prjoect, and try to call the function from a form within the project, I get an "object required" error on the parameter 'acExportDelim' in the module. Does anyone have an idea what is going wrong?

    *****Module code:******

    'Option Compare Database

    '------------------------------------------------------------
    ' exportmacro
    '
    '------------------------------------------------------------
    Function exportmacro()
    On Error GoTo exportmacro_Err

    DoCmd.TransferText acExportDelim, "", "TEST Query, "C:\test\testing.txt", True, ""


    exportmacro_Exit:
    Exit Function

    exportmacro_Err:
    MsgBox Error$
    Resume exportmacro_Exit

    End Function


    *****Code from form:*****

    Private Sub Command1_Click()
    call exportmacro
    End Sub




    Any help would be greatly appreciated!
    Thanks,
    Sean

  2. #2
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    421
    DoCmd.TransferText acExportDelim, "", "TEST Query", "C:\test\testing.txt", True, ""

    You are missing a " after TEST Query and you really should specify an export specification (the first "") instead of the empty string...

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •