Transfer Text error (3011)

Discussion in 'Microsoft Access External Data' started by Guest, Aug 14, 2007.

  1. Guest

    Guest Guest

    I have a table: Inspection_EXPORT with an export specification: RTM_export.
    I want to export the table into a CSV file locally. I've written a function
    in a module using Transfer.text to do this:

    Public Function EXPORT_Inspections()

    DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    "c:\test.txt", True

    End Function

    I am getting this error:
    Run-time error '3011':
    "The Microsoft Office Access database engine could not find the object
    'test#txt'. Make sure the object exists and that you spell its name and the
    path name correctly.

    ---------
    I have a few questions.
    1- Why is the engine trying to make sure the future export file exists?
    It's an exported file, it doesnt exist yet...
    2- Why is it being referred to as 'test#txt'? Did I write the wrong syntax?
    3- If I wanted a .CSV file, could I just name it test.csv- or do I need to
    do something else?

    Thanks for your patience and help.
     
    Guest, Aug 14, 2007
    #1
    1. Advertisements

  2. Well, no. You're using a fixed export in the TransferText and CSV is a
    delimited format. Here's what I would do:

    1: Export the table as a CSV manually, creating and saving an Export
    Specification in the process. (That is, only if you need it. The vanilla
    Delimited export may work just fine.)
    2. Create a macro using the TransferText action and fill in all the
    arguments in the lower portion. Make sure you select Export Delimited in
    the Transfer Type line.
    3. Save the macro As a VB module. This will give you the correct syntax for
    your DoCmd.TransferText line.

    --
    --Roger Carlson
    MS Access MVP
    Access Database Samples: www.rogersaccesslibrary.com
    Want answers to your Access questions in your Email?
    Free subscription:
    http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


    "jknoll" <> wrote in message
    news:...
    >I have a table: Inspection_EXPORT with an export specification: RTM_export.
    > I want to export the table into a CSV file locally. I've written a
    > function
    > in a module using Transfer.text to do this:
    >
    > Public Function EXPORT_Inspections()
    >
    > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    > "c:\test.txt", True
    >
    > End Function
    >
    > I am getting this error:
    > Run-time error '3011':
    > "The Microsoft Office Access database engine could not find the object
    > 'test#txt'. Make sure the object exists and that you spell its name and
    > the
    > path name correctly.
    >
    > ---------
    > I have a few questions.
    > 1- Why is the engine trying to make sure the future export file exists?
    > It's an exported file, it doesnt exist yet...
    > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    > syntax?
    > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need to
    > do something else?
    >
    > Thanks for your patience and help.
     
    Roger Carlson, Aug 14, 2007
    #2
  3. Guest

    Guest Guest

    I don't have the TransferText action in the drop down when I am building a
    macro... Am I in the wrong place?

    I've changed the acExportFixed to acExportDelim and changed the saved export
    specificaiton to a delimited export. I still get the same error.

    Any ideas?

    "Roger Carlson" wrote:

    > Well, no. You're using a fixed export in the TransferText and CSV is a
    > delimited format. Here's what I would do:
    >
    > 1: Export the table as a CSV manually, creating and saving an Export
    > Specification in the process. (That is, only if you need it. The vanilla
    > Delimited export may work just fine.)
    > 2. Create a macro using the TransferText action and fill in all the
    > arguments in the lower portion. Make sure you select Export Delimited in
    > the Transfer Type line.
    > 3. Save the macro As a VB module. This will give you the correct syntax for
    > your DoCmd.TransferText line.
    >
    > --
    > --Roger Carlson
    > MS Access MVP
    > Access Database Samples: www.rogersaccesslibrary.com
    > Want answers to your Access questions in your Email?
    > Free subscription:
    > http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >
    >
    > "jknoll" <> wrote in message
    > news:...
    > >I have a table: Inspection_EXPORT with an export specification: RTM_export.
    > > I want to export the table into a CSV file locally. I've written a
    > > function
    > > in a module using Transfer.text to do this:
    > >
    > > Public Function EXPORT_Inspections()
    > >
    > > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    > > "c:\test.txt", True
    > >
    > > End Function
    > >
    > > I am getting this error:
    > > Run-time error '3011':
    > > "The Microsoft Office Access database engine could not find the object
    > > 'test#txt'. Make sure the object exists and that you spell its name and
    > > the
    > > path name correctly.
    > >
    > > ---------
    > > I have a few questions.
    > > 1- Why is the engine trying to make sure the future export file exists?
    > > It's an exported file, it doesnt exist yet...
    > > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    > > syntax?
    > > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need to
    > > do something else?
    > >
    > > Thanks for your patience and help.

    >
    >
    >
     
    Guest, Aug 14, 2007
    #3
  4. Guest

    Guest Guest

    Additionally when I try to manually export the file - then save the export
    process (lets say export2) - when I try to reference that in my function:

    DoCmd.TransferText acExportFixed, "export2", "Inspection_EXPORT",
    "c:\test.txt", True

    It gives me a run-time error 3625- that text file specification "export2"
    does not exist.

    Very confusing...


    "Roger Carlson" wrote:

    > Well, no. You're using a fixed export in the TransferText and CSV is a
    > delimited format. Here's what I would do:
    >
    > 1: Export the table as a CSV manually, creating and saving an Export
    > Specification in the process. (That is, only if you need it. The vanilla
    > Delimited export may work just fine.)
    > 2. Create a macro using the TransferText action and fill in all the
    > arguments in the lower portion. Make sure you select Export Delimited in
    > the Transfer Type line.
    > 3. Save the macro As a VB module. This will give you the correct syntax for
    > your DoCmd.TransferText line.
    >
    > --
    > --Roger Carlson
    > MS Access MVP
    > Access Database Samples: www.rogersaccesslibrary.com
    > Want answers to your Access questions in your Email?
    > Free subscription:
    > http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >
    >
    > "jknoll" <> wrote in message
    > news:...
    > >I have a table: Inspection_EXPORT with an export specification: RTM_export.
    > > I want to export the table into a CSV file locally. I've written a
    > > function
    > > in a module using Transfer.text to do this:
    > >
    > > Public Function EXPORT_Inspections()
    > >
    > > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    > > "c:\test.txt", True
    > >
    > > End Function
    > >
    > > I am getting this error:
    > > Run-time error '3011':
    > > "The Microsoft Office Access database engine could not find the object
    > > 'test#txt'. Make sure the object exists and that you spell its name and
    > > the
    > > path name correctly.
    > >
    > > ---------
    > > I have a few questions.
    > > 1- Why is the engine trying to make sure the future export file exists?
    > > It's an exported file, it doesnt exist yet...
    > > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    > > syntax?
    > > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need to
    > > do something else?
    > >
    > > Thanks for your patience and help.

    >
    >
    >
     
    Guest, Aug 14, 2007
    #4
  5. TransferText is a standard action in the macro builder. It's usually the
    very last one on the list. I suggested the steps below because I'm not able
    to see your query, export spec, and so forth. Is RTM_Export the name of your
    export spec? Is Inspection_EXPORT the name of the table/query? Do you
    actually want to export the fieldnames? Assuming these are correct, the
    only other thing I'd try is to add an additional empty parameter at the end:

    DoCmd.TransferText acExportDelim, "RTM_Export", "Inspection_EXPORT",
    "c:\test.txt", True, ""


    --
    --Roger Carlson
    MS Access MVP
    Access Database Samples: www.rogersaccesslibrary.com
    Want answers to your Access questions in your Email?
    Free subscription:
    http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

    "jknoll" <> wrote in message
    news:...
    >I don't have the TransferText action in the drop down when I am building a
    > macro... Am I in the wrong place?
    >
    > I've changed the acExportFixed to acExportDelim and changed the saved
    > export
    > specificaiton to a delimited export. I still get the same error.
    >
    > Any ideas?
    >
    > "Roger Carlson" wrote:
    >
    >> Well, no. You're using a fixed export in the TransferText and CSV is a
    >> delimited format. Here's what I would do:
    >>
    >> 1: Export the table as a CSV manually, creating and saving an Export
    >> Specification in the process. (That is, only if you need it. The
    >> vanilla
    >> Delimited export may work just fine.)
    >> 2. Create a macro using the TransferText action and fill in all the
    >> arguments in the lower portion. Make sure you select Export Delimited in
    >> the Transfer Type line.
    >> 3. Save the macro As a VB module. This will give you the correct syntax
    >> for
    >> your DoCmd.TransferText line.
    >>
    >> --
    >> --Roger Carlson
    >> MS Access MVP
    >> Access Database Samples: www.rogersaccesslibrary.com
    >> Want answers to your Access questions in your Email?
    >> Free subscription:
    >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >>
    >>
    >> "jknoll" <> wrote in message
    >> news:...
    >> >I have a table: Inspection_EXPORT with an export specification:
    >> >RTM_export.
    >> > I want to export the table into a CSV file locally. I've written a
    >> > function
    >> > in a module using Transfer.text to do this:
    >> >
    >> > Public Function EXPORT_Inspections()
    >> >
    >> > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    >> > "c:\test.txt", True
    >> >
    >> > End Function
    >> >
    >> > I am getting this error:
    >> > Run-time error '3011':
    >> > "The Microsoft Office Access database engine could not find the object
    >> > 'test#txt'. Make sure the object exists and that you spell its name and
    >> > the
    >> > path name correctly.
    >> >
    >> > ---------
    >> > I have a few questions.
    >> > 1- Why is the engine trying to make sure the future export file exists?
    >> > It's an exported file, it doesnt exist yet...
    >> > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    >> > syntax?
    >> > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need
    >> > to
    >> > do something else?
    >> >
    >> > Thanks for your patience and help.

    >>
    >>
    >>
     
    Roger Carlson, Aug 14, 2007
    #5
  6. Guest

    Guest Guest

    Roger,

    I think I'm closer now...

    I converted the macro using transfer text to a module, then put a button on
    my form that called another macro that calls the function RunExport().

    Now I get a regular error (no error number):
    The microsoft office access database engine could not find the object
    'test#csv'. Make sure the object exists and that you spell its name and the
    path name correctly.

    This is still confusing since I am not trying to reference anything. My
    path is simply c:\ and the file name is test.csv. There is no test file in
    my c:\ - why does it keep wanting to reference a file that doesnt exist yet?

    Thanks!



    '------------------------------------------------------------
    ' RunExport
    '
    '------------------------------------------------------------
    Function RunExport()
    On Error GoTo RunExport_Err

    DoCmd.TransferText acExportDelim, "RTM_export", "Inspection_EXPORT",
    "c:\test.csv", True, ""


    RunExport_Exit:
    Exit Function

    RunExport_Err:
    MsgBox Error$
    Resume RunExport_Exit

    End Function

    "Roger Carlson" wrote:

    > TransferText is a standard action in the macro builder. It's usually the
    > very last one on the list. I suggested the steps below because I'm not able
    > to see your query, export spec, and so forth. Is RTM_Export the name of your
    > export spec? Is Inspection_EXPORT the name of the table/query? Do you
    > actually want to export the fieldnames? Assuming these are correct, the
    > only other thing I'd try is to add an additional empty parameter at the end:
    >
    > DoCmd.TransferText acExportDelim, "RTM_Export", "Inspection_EXPORT",
    > "c:\test.txt", True, ""
    >
    >
    > --
    > --Roger Carlson
    > MS Access MVP
    > Access Database Samples: www.rogersaccesslibrary.com
    > Want answers to your Access questions in your Email?
    > Free subscription:
    > http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >
    > "jknoll" <> wrote in message
    > news:...
    > >I don't have the TransferText action in the drop down when I am building a
    > > macro... Am I in the wrong place?
    > >
    > > I've changed the acExportFixed to acExportDelim and changed the saved
    > > export
    > > specificaiton to a delimited export. I still get the same error.
    > >
    > > Any ideas?
    > >
    > > "Roger Carlson" wrote:
    > >
    > >> Well, no. You're using a fixed export in the TransferText and CSV is a
    > >> delimited format. Here's what I would do:
    > >>
    > >> 1: Export the table as a CSV manually, creating and saving an Export
    > >> Specification in the process. (That is, only if you need it. The
    > >> vanilla
    > >> Delimited export may work just fine.)
    > >> 2. Create a macro using the TransferText action and fill in all the
    > >> arguments in the lower portion. Make sure you select Export Delimited in
    > >> the Transfer Type line.
    > >> 3. Save the macro As a VB module. This will give you the correct syntax
    > >> for
    > >> your DoCmd.TransferText line.
    > >>
    > >> --
    > >> --Roger Carlson
    > >> MS Access MVP
    > >> Access Database Samples: www.rogersaccesslibrary.com
    > >> Want answers to your Access questions in your Email?
    > >> Free subscription:
    > >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    > >>
    > >>
    > >> "jknoll" <> wrote in message
    > >> news:...
    > >> >I have a table: Inspection_EXPORT with an export specification:
    > >> >RTM_export.
    > >> > I want to export the table into a CSV file locally. I've written a
    > >> > function
    > >> > in a module using Transfer.text to do this:
    > >> >
    > >> > Public Function EXPORT_Inspections()
    > >> >
    > >> > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    > >> > "c:\test.txt", True
    > >> >
    > >> > End Function
    > >> >
    > >> > I am getting this error:
    > >> > Run-time error '3011':
    > >> > "The Microsoft Office Access database engine could not find the object
    > >> > 'test#txt'. Make sure the object exists and that you spell its name and
    > >> > the
    > >> > path name correctly.
    > >> >
    > >> > ---------
    > >> > I have a few questions.
    > >> > 1- Why is the engine trying to make sure the future export file exists?
    > >> > It's an exported file, it doesnt exist yet...
    > >> > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    > >> > syntax?
    > >> > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need
    > >> > to
    > >> > do something else?
    > >> >
    > >> > Thanks for your patience and help.
    > >>
    > >>
    > >>

    >
    >
    >
     
    Guest, Aug 14, 2007
    #6
  7. Well, unfortunately, it's got me stumped. If no one else answers in a
    couple of days, try re-posting.

    Sorry.


    --
    --Roger Carlson
    MS Access MVP
    Access Database Samples: www.rogersaccesslibrary.com
    Want answers to your Access questions in your Email?
    Free subscription:
    http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

    "jknoll" <> wrote in message
    news:...
    > Roger,
    >
    > I think I'm closer now...
    >
    > I converted the macro using transfer text to a module, then put a button
    > on
    > my form that called another macro that calls the function RunExport().
    >
    > Now I get a regular error (no error number):
    > The microsoft office access database engine could not find the object
    > 'test#csv'. Make sure the object exists and that you spell its name and
    > the
    > path name correctly.
    >
    > This is still confusing since I am not trying to reference anything. My
    > path is simply c:\ and the file name is test.csv. There is no test file
    > in
    > my c:\ - why does it keep wanting to reference a file that doesnt exist
    > yet?
    >
    > Thanks!
    >
    >
    >
    > '------------------------------------------------------------
    > ' RunExport
    > '
    > '------------------------------------------------------------
    > Function RunExport()
    > On Error GoTo RunExport_Err
    >
    > DoCmd.TransferText acExportDelim, "RTM_export", "Inspection_EXPORT",
    > "c:\test.csv", True, ""
    >
    >
    > RunExport_Exit:
    > Exit Function
    >
    > RunExport_Err:
    > MsgBox Error$
    > Resume RunExport_Exit
    >
    > End Function
    >
    > "Roger Carlson" wrote:
    >
    >> TransferText is a standard action in the macro builder. It's usually the
    >> very last one on the list. I suggested the steps below because I'm not
    >> able
    >> to see your query, export spec, and so forth. Is RTM_Export the name of
    >> your
    >> export spec? Is Inspection_EXPORT the name of the table/query? Do you
    >> actually want to export the fieldnames? Assuming these are correct, the
    >> only other thing I'd try is to add an additional empty parameter at the
    >> end:
    >>
    >> DoCmd.TransferText acExportDelim, "RTM_Export", "Inspection_EXPORT",
    >> "c:\test.txt", True, ""
    >>
    >>
    >> --
    >> --Roger Carlson
    >> MS Access MVP
    >> Access Database Samples: www.rogersaccesslibrary.com
    >> Want answers to your Access questions in your Email?
    >> Free subscription:
    >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >>
    >> "jknoll" <> wrote in message
    >> news:...
    >> >I don't have the TransferText action in the drop down when I am building
    >> >a
    >> > macro... Am I in the wrong place?
    >> >
    >> > I've changed the acExportFixed to acExportDelim and changed the saved
    >> > export
    >> > specificaiton to a delimited export. I still get the same error.
    >> >
    >> > Any ideas?
    >> >
    >> > "Roger Carlson" wrote:
    >> >
    >> >> Well, no. You're using a fixed export in the TransferText and CSV is
    >> >> a
    >> >> delimited format. Here's what I would do:
    >> >>
    >> >> 1: Export the table as a CSV manually, creating and saving an Export
    >> >> Specification in the process. (That is, only if you need it. The
    >> >> vanilla
    >> >> Delimited export may work just fine.)
    >> >> 2. Create a macro using the TransferText action and fill in all the
    >> >> arguments in the lower portion. Make sure you select Export Delimited
    >> >> in
    >> >> the Transfer Type line.
    >> >> 3. Save the macro As a VB module. This will give you the correct
    >> >> syntax
    >> >> for
    >> >> your DoCmd.TransferText line.
    >> >>
    >> >> --
    >> >> --Roger Carlson
    >> >> MS Access MVP
    >> >> Access Database Samples: www.rogersaccesslibrary.com
    >> >> Want answers to your Access questions in your Email?
    >> >> Free subscription:
    >> >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >> >>
    >> >>
    >> >> "jknoll" <> wrote in message
    >> >> news:...
    >> >> >I have a table: Inspection_EXPORT with an export specification:
    >> >> >RTM_export.
    >> >> > I want to export the table into a CSV file locally. I've written a
    >> >> > function
    >> >> > in a module using Transfer.text to do this:
    >> >> >
    >> >> > Public Function EXPORT_Inspections()
    >> >> >
    >> >> > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    >> >> > "c:\test.txt", True
    >> >> >
    >> >> > End Function
    >> >> >
    >> >> > I am getting this error:
    >> >> > Run-time error '3011':
    >> >> > "The Microsoft Office Access database engine could not find the
    >> >> > object
    >> >> > 'test#txt'. Make sure the object exists and that you spell its name
    >> >> > and
    >> >> > the
    >> >> > path name correctly.
    >> >> >
    >> >> > ---------
    >> >> > I have a few questions.
    >> >> > 1- Why is the engine trying to make sure the future export file
    >> >> > exists?
    >> >> > It's an exported file, it doesnt exist yet...
    >> >> > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    >> >> > syntax?
    >> >> > 3- If I wanted a .CSV file, could I just name it test.csv- or do I
    >> >> > need
    >> >> > to
    >> >> > do something else?
    >> >> >
    >> >> > Thanks for your patience and help.
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Roger Carlson, Aug 14, 2007
    #7
  8. Guest

    Gina Whipp Guest

    Do you have the tables MSysIMEXSpecs and MSysIMEXColumns? If yes, then in
    the Specs one there should be the name of your specification file, what does
    it say? If no then try the below line:

    DoCmd.TransferText acExportFixed, , "Inspection_EXPORT", "c:\test.txt"


    --
    Gina Whipp

    "I feel I have been denied critical, need to know, information!" - Tremors
    II

    "jknoll" <> wrote in message
    news:...
    > Additionally when I try to manually export the file - then save the export
    > process (lets say export2) - when I try to reference that in my function:
    >
    > DoCmd.TransferText acExportFixed, "export2", "Inspection_EXPORT",
    > "c:\test.txt", True
    >
    > It gives me a run-time error 3625- that text file specification "export2"
    > does not exist.
    >
    > Very confusing...
    >
    >
    > "Roger Carlson" wrote:
    >
    >> Well, no. You're using a fixed export in the TransferText and CSV is a
    >> delimited format. Here's what I would do:
    >>
    >> 1: Export the table as a CSV manually, creating and saving an Export
    >> Specification in the process. (That is, only if you need it. The
    >> vanilla
    >> Delimited export may work just fine.)
    >> 2. Create a macro using the TransferText action and fill in all the
    >> arguments in the lower portion. Make sure you select Export Delimited in
    >> the Transfer Type line.
    >> 3. Save the macro As a VB module. This will give you the correct syntax
    >> for
    >> your DoCmd.TransferText line.
    >>
    >> --
    >> --Roger Carlson
    >> MS Access MVP
    >> Access Database Samples: www.rogersaccesslibrary.com
    >> Want answers to your Access questions in your Email?
    >> Free subscription:
    >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >>
    >>
    >> "jknoll" <> wrote in message
    >> news:...
    >> >I have a table: Inspection_EXPORT with an export specification:
    >> >RTM_export.
    >> > I want to export the table into a CSV file locally. I've written a
    >> > function
    >> > in a module using Transfer.text to do this:
    >> >
    >> > Public Function EXPORT_Inspections()
    >> >
    >> > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    >> > "c:\test.txt", True
    >> >
    >> > End Function
    >> >
    >> > I am getting this error:
    >> > Run-time error '3011':
    >> > "The Microsoft Office Access database engine could not find the object
    >> > 'test#txt'. Make sure the object exists and that you spell its name and
    >> > the
    >> > path name correctly.
    >> >
    >> > ---------
    >> > I have a few questions.
    >> > 1- Why is the engine trying to make sure the future export file exists?
    >> > It's an exported file, it doesnt exist yet...
    >> > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    >> > syntax?
    >> > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need
    >> > to
    >> > do something else?
    >> >
    >> > Thanks for your patience and help.

    >>
    >>
    >>
     
    Gina Whipp, Aug 14, 2007
    #8
  9. Guest

    John Nurick Guest

    I'm guessing, but do you (or rather the user account under which
    Access is running) have write permissions on C:\ ?

    On Tue, 14 Aug 2007 09:42:01 -0700, jknoll <>
    wrote:

    >Roger,
    >
    >I think I'm closer now...
    >
    >I converted the macro using transfer text to a module, then put a button on
    >my form that called another macro that calls the function RunExport().
    >
    >Now I get a regular error (no error number):
    >The microsoft office access database engine could not find the object
    >'test#csv'. Make sure the object exists and that you spell its name and the
    >path name correctly.
    >
    >This is still confusing since I am not trying to reference anything. My
    >path is simply c:\ and the file name is test.csv. There is no test file in
    >my c:\ - why does it keep wanting to reference a file that doesnt exist yet?
    >
    >Thanks!
    >
    >
    >
    >'------------------------------------------------------------
    >' RunExport
    >'
    >'------------------------------------------------------------
    >Function RunExport()
    >On Error GoTo RunExport_Err
    >
    > DoCmd.TransferText acExportDelim, "RTM_export", "Inspection_EXPORT",
    >"c:\test.csv", True, ""
    >
    >
    >RunExport_Exit:
    > Exit Function
    >
    >RunExport_Err:
    > MsgBox Error$
    > Resume RunExport_Exit
    >
    >End Function
    >
    >"Roger Carlson" wrote:
    >
    >> TransferText is a standard action in the macro builder. It's usually the
    >> very last one on the list. I suggested the steps below because I'm not able
    >> to see your query, export spec, and so forth. Is RTM_Export the name of your
    >> export spec? Is Inspection_EXPORT the name of the table/query? Do you
    >> actually want to export the fieldnames? Assuming these are correct, the
    >> only other thing I'd try is to add an additional empty parameter at the end:
    >>
    >> DoCmd.TransferText acExportDelim, "RTM_Export", "Inspection_EXPORT",
    >> "c:\test.txt", True, ""
    >>
    >>
    >> --
    >> --Roger Carlson
    >> MS Access MVP
    >> Access Database Samples: www.rogersaccesslibrary.com
    >> Want answers to your Access questions in your Email?
    >> Free subscription:
    >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >>
    >> "jknoll" <> wrote in message
    >> news:...
    >> >I don't have the TransferText action in the drop down when I am building a
    >> > macro... Am I in the wrong place?
    >> >
    >> > I've changed the acExportFixed to acExportDelim and changed the saved
    >> > export
    >> > specificaiton to a delimited export. I still get the same error.
    >> >
    >> > Any ideas?
    >> >
    >> > "Roger Carlson" wrote:
    >> >
    >> >> Well, no. You're using a fixed export in the TransferText and CSV is a
    >> >> delimited format. Here's what I would do:
    >> >>
    >> >> 1: Export the table as a CSV manually, creating and saving an Export
    >> >> Specification in the process. (That is, only if you need it. The
    >> >> vanilla
    >> >> Delimited export may work just fine.)
    >> >> 2. Create a macro using the TransferText action and fill in all the
    >> >> arguments in the lower portion. Make sure you select Export Delimited in
    >> >> the Transfer Type line.
    >> >> 3. Save the macro As a VB module. This will give you the correct syntax
    >> >> for
    >> >> your DoCmd.TransferText line.
    >> >>
    >> >> --
    >> >> --Roger Carlson
    >> >> MS Access MVP
    >> >> Access Database Samples: www.rogersaccesslibrary.com
    >> >> Want answers to your Access questions in your Email?
    >> >> Free subscription:
    >> >> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
    >> >>
    >> >>
    >> >> "jknoll" <> wrote in message
    >> >> news:...
    >> >> >I have a table: Inspection_EXPORT with an export specification:
    >> >> >RTM_export.
    >> >> > I want to export the table into a CSV file locally. I've written a
    >> >> > function
    >> >> > in a module using Transfer.text to do this:
    >> >> >
    >> >> > Public Function EXPORT_Inspections()
    >> >> >
    >> >> > DoCmd.TransferText acExportFixed, "RTM_Export", "Inspection_EXPORT",
    >> >> > "c:\test.txt", True
    >> >> >
    >> >> > End Function
    >> >> >
    >> >> > I am getting this error:
    >> >> > Run-time error '3011':
    >> >> > "The Microsoft Office Access database engine could not find the object
    >> >> > 'test#txt'. Make sure the object exists and that you spell its name and
    >> >> > the
    >> >> > path name correctly.
    >> >> >
    >> >> > ---------
    >> >> > I have a few questions.
    >> >> > 1- Why is the engine trying to make sure the future export file exists?
    >> >> > It's an exported file, it doesnt exist yet...
    >> >> > 2- Why is it being referred to as 'test#txt'? Did I write the wrong
    >> >> > syntax?
    >> >> > 3- If I wanted a .CSV file, could I just name it test.csv- or do I need
    >> >> > to
    >> >> > do something else?
    >> >> >
    >> >> > Thanks for your patience and help.
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>

    --
    John Nurick - Access MVP
     
    John Nurick, Aug 15, 2007
    #9
  10. Recreate the export file

    I had a similar problem after making some changes to the underlying query. Try recreating the export file, this worked for me.

    Good Luck
     
    David Ritchie, Jun 5, 2008
    #10
  11. Guest

    Paris Finley Guest

    The "#" shows up in the error when...

    The "#" shows up in the error when you've modified the export table/query by removing or adding a field(s) to it AFTER you created your export specifications.

    Manually do the export one more time and save over the old specs.



    jknol wrote:

    Transfer Text error (3011)
    14-Aug-07

    I have a table: Inspection_EXPORT with an export specification: RTM_export.
    I want to export the table into a CSV file locally. I have written a function
    in a module using Transfer.text to do this:

    Previous Posts In This Thread:

    On Tuesday, August 14, 2007 10:40 AM
    jknol wrote:

    Transfer Text error (3011)
    I have a table: Inspection_EXPORT with an export specification: RTM_export.
    I want to export the table into a CSV file locally. I have written a function
    in a module using Transfer.text to do this:

    On Tuesday, August 14, 2007 11:44 AM
    Roger Carlson wrote:

    Well, no.
    Well, no. You're using a fixed export in the TransferText and CSV is a
    delimited format. Here is what I would do:

    1: Export the table as a CSV manually, creating and saving an Export
    Specification

    On Tuesday, August 14, 2007 12:00 PM
    jknol wrote:

    I don't have the TransferText action in the drop down when I am building a
    I do not have the TransferText action in the drop down when I am building a
    macro... Am I in the wrong place?

    I have changed the acExportFixed to acExportDelim and changed the saved export
    specifica

    On Tuesday, August 14, 2007 12:10 PM
    jknol wrote:

    Additionally when I try to manually export the file - then save the export
    Additionally when I try to manually export the file - then save the export
    process (lets say export2) - when I try to reference that in my function:

    DoCmd.TransferText acExportFixed, "export2", "Insp

    On Tuesday, August 14, 2007 12:19 PM
    Roger Carlson wrote:

    TransferText is a standard action in the macro builder.
    TransferText is a standard action in the macro builder. it is usually the
    very last one on the list. I suggested the steps below because I am not able
    to see your query, export spec, and so forth. I

    On Tuesday, August 14, 2007 12:42 PM
    jknol wrote:

    Roger,I think I'm closer now...
    Roger,

    I think I am closer now...

    I converted the macro using transfer text to a module, then put a button on
    my form that called another macro that calls the function RunExport().

    Now I get a regu

    On Tuesday, August 14, 2007 2:53 PM
    Roger Carlson wrote:

    Well, unfortunately, it's got me stumped.
    Well, unfortunately, it is got me stumped. If no one else answers in a
    couple of days, try re-posting.

    Sorry.


    --
    --Roger Carlson
    MS Access MVP
    Access Database Samples: www.rogersaccesslibrary.com

    On Tuesday, August 14, 2007 3:11 PM
    Gina Whipp wrote:

    Do you have the tables MSysIMEXSpecs and MSysIMEXColumns?
    Do you have the tables MSysIMEXSpecs and MSysIMEXColumns? If yes, then in
    the Specs one there should be the name of your specification file, what does
    it say? If no then try the below line:

    DoCmd.T

    On Wednesday, August 15, 2007 4:08 PM
    John Nurick wrote:

    I'm guessing, but do you (or rather the user account under whichAccess is
    I am guessing, but do you (or rather the user account under which
    Access is running) have write permissions on C:\ ?

    wrote:

    --
    John Nurick - Access MVP

    On Thursday, June 05, 2008 9:43 AM
    David Ritchie wrote:

    Recreate the export file
    I had a similar problem after making some changes to the underlying query. Try recreating the export file, this worked for me.

    Good Luck

    EggHeadCafe - Software Developer Portal of Choice
    Visual Basic And FTP Project Sample
    http://www.eggheadcafe.com/tutorial...b-cfe42b6ff731/visual-basic-and-ftp-proj.aspx
     
    Paris Finley, Oct 22, 2009
    #11
  12. Guest

    cpc

    Joined:
    Jan 19, 2012
    Messages:
    1
    Likes Received:
    0
    I encountered this problem and ultimately concluded that my saved export format no longer matched the table I was exporting. To see if this is your problem, simply open the table you are exporting and try to export it through the export wizard. When you get the chance, call up your save export format and continue with the export. Access will probably tell you about the field it does not recognize. Error 3011 is obviously a very misleading message. It has nothing to do with "not finding" the file name you are trying to export.
     
    cpc, Jan 19, 2012
    #12
  13. Guest

    KWells

    Joined:
    Aug 3, 2012
    Messages:
    3
    Likes Received:
    0
    ----------

    After encountering the exact same error as the first poster in this thread ("...file not found...") and then much trial and error, this (above) was the solution.

    I recreated the table (from which the export is done) and then recreated the export specification. (I had made a change to the query that populated the table and this is ultimately what caused the problems.)

    After recreating these objects, the code ran just fine.

    Wouldn't it be nice if the Access errors were helpful? Many or most of them are not.
     
    KWells, Aug 3, 2012
    #13

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve

    IMPORT ERROR 3011

    Steve, Jul 3, 2003, in forum: Microsoft Access External Data
    Replies:
    0
    Views:
    703
    Steve
    Jul 3, 2003
  2. Steve

    IMPORT ERROR 3011

    Steve, Jul 4, 2003, in forum: Microsoft Access External Data
    Replies:
    7
    Views:
    8,285
    John Nurick
    Jul 8, 2003
  3. Guest

    error 3011 when i would like open a .dbf to import in access.

    Guest, Nov 30, 2004, in forum: Microsoft Access External Data
    Replies:
    3
    Views:
    435
    John Nurick
    Dec 1, 2004
  4. Run-time Error '3011' - Converts '.' --> '#'

    , Dec 9, 2005, in forum: Microsoft Access External Data
    Replies:
    0
    Views:
    277
  5. LJG

    Run-time error '3011'

    LJG, Jul 30, 2006, in forum: Microsoft Access External Data
    Replies:
    1
    Views:
    293
    Pieter Wijnen
    Jul 30, 2006
Loading...

Share This Page