DataBase - DoCmd.TransferText Method combines header into one

Asked By TraciAnn via AccessMonster.com
20-Nov-09 04:59 PM
I am running a straight and simple TransferText method and getting an error:

Run-time error '2391':
Field 'RequestID_PartID_UnitNum' does not exist in destination table
'RequestPart'

The code is such:
DoCmd.TransferText acImportDelim, , "RequestPart", "C:\importrequestpart.txt",
True

importrequestpart.txt is a tab delimited file with a header row (3 columns).
I have verified that tabs do exist between each header and a tab exists
between each column value. For testing purposes I am only importing 1 row.

Thanks for your help!

--
---
TraciAnn

Message posted via http://www.accessmonster.com
DoCmd.TransferText
(1)
Database
(1)
PartID
(1)
AcImportDelim
(1)
TransferText
(1)
RequestPart
(1)
Stiphout
(1)
Beforeyou
(1)
  Tom van Stiphout replied to TraciAnn via AccessMonster.com
20-Nov-09 05:49 PM
acImportDelim expects a comma-separated file. If you want tabs, create an
export specification and use it in your command.

-Tom van Stiphout
Microsoft Access MVP
  TraciAnn via AccessMonster.com replied to Tom van Stiphout
24-Nov-09 12:27 PM
Tom,

I am not familiar with creating an "export specification" could you please
elaborate?

Thanks!

--
---
TraciAnn

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/200911/1
  Pat Coleman replied to TraciAnn via AccessMonster.com
25-Nov-09 11:40 AM
Go through the motions of exporting your table or query manually and before
you press the finish button, there is a button called advanced. Click that
and then click 'save as' and a box will pop up that saves your export
specifications for that table or query.

This will then appear in the the list of export specs for your database
which you will invoke if you are running a script or macro.

Pat
Create New Account
help
Library Database DataBase Firstly, I am not sure if Library database is the correct term. I am talking about Dbs to which you set a reference drew blanks last time. Now assuming I have several referenced (library?) databases in my main database, how do I get the names of all the forms in all the Dbs? CodeProject AllForms.Count gives me the correct number of forms if I am in that referenced database. What I think I need is a method of looping through all the different CodeProject names in the main database, but there is not a sort of CodeProjects parent object. Or somehow moving the focus And, No, there is not any parent object for all the code projects. Because each database only knows about its own objects (or documents), you have to use a procedure in each database to refer to the objects in that database. E.g. to open a form in
Might be outgrowing Access but daunted by SQL Server DataBase I am close to completing the consolidation of various small Access databases and a couple of Excel spreadsheets that my little company uses (5 staff) into an all encompasing Access database and I was planning on splitting the database when I was finished to allow simaltaneous use of it by staff on our small to me that I am going to need to give staff access to this new database from remote locations (outside of our office network). Two staff members are regularly overseas, one been playing around with trying to link tables from remote locations (ftp path of the database on our Network Storage Device at the office) and needless to say - that do not It all started when I came across a very encouraging article on keeping your Access database as your front end application and linking to SQL Server database tables. I am finding it MUCH more complicated than I had hoped. Can anyone suggest a simpler way of achieving remote access to my database? I have at my disposal a Network Storage Device which has remote access capabilities (this
Trasferimento file DataBase DoCmd.TransferText acImportFixed, "PartecipantiBarCode - specifica di collegamento1", "ImportaTerminalePartenze00009182", DoCmd.TransferText acImportFixed, "PartecipantiBarCode - specifica di collegamento1", "ImportaTerminalePartenze00009187", DoCmd.TransferText acImportFixed, "PartecipantiBarCode - specifica di collegamento1", "ImportaTerminalePartenze00009188", DoCmd.TransferText acImportFixed, "PartecipantiBarCode - specifica di collegamento1", "ImportaTerminalePartenze00009189", Per favore chi mi aiuta? Devo eseguire questo
Automatisation_d'importation_de_données DataBase Bonjour = E0 tous, Sous Access 2003 j'utilise la fonction d'importation de donn = E9es A8s bien (je il ulante des nner le t ue Salut, Utilise la fonction VBA : docmd.TransferText . . . - - A+ Pierre (3stone) Access MVP Perso: http: / / www.3stone.be / MPFA: http: / / www.mpfa.info que tu utiliserass par la suite. par exemple: "Export_Clients" Ensuite, tu utilise comme dit précédemment : Docmd.TransferText acImportDelim, "Export_Clients", "NomTable ou requête" Simple, non ? ;-) - - A+ Pierre (3stone) Access MVP Perso: http: / / www.3stone mon mod = E8le, que j'ai appel = E9 "GPS", ma table s'appele cde siivant DoCmd.TransferText acImportDelim, "GPS", "tblspeed" Et j'ai une erreur 2522 qui me dit que la m
Can't export a pass through query. . . DataBase Hello. I am using docmd.transfertext to export a pass through (to SQL Server) query to a txt file. When I execute DoCmd.TransferText acExportDelim, "MyExportSpec", "qryPassThru", sFile, True I keep getting the error Operation is not supported for populate a receiving table BY looping through the recordset object. Then you can perform the DoCmd.TransferText operation from the receiving table. Rich * ** Sent via Developersdex http: / / www.developersdex.com * ** Just copy Execute "drop table t1" On Error GoTo 0 CurrentDb.Execute "select *.* into t1 from pq" DoCmd.TransferText acExportDelim, , "t1", "c: \ test.txt", True So, you do not have to loop at