Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2008

Tip: Looking for answers? Try searching our database.

How do I automate importing text file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Russ - 25 May 2008 20:38 GMT
Hello,

Question 1 is how do you automate the importing of a text file?
Here is an example of the information;

"Emp","63","Department","87","05-24-2008","06:50:37","Process","A","87",
"Item","92","QTY","55"
"Emp","63","Department","87","05-24-2008","06:50:37","Process","A","87",
"Item","63","QTY","99"
"Emp","63","Department","87","05-24-2008","06:50:37","Process","A","87",
"Item","15","QTY","55","06:50:50","<<F3>>"

Problem 2 is sometimes (depending on the process) there are more fields like
this;

"Emp","63","Department","87","05-24-2008","06:50:16","Process","C","7","Item",
"92","QTY","88"
"Emp","63","Department","87","05-24-2008","06:50:16","Process","C","7","Item",
"87","QTY","99"
"Emp","63","Department","87","05-24-2008","06:50:16","Process","C","7","Item",
"63","QTY","77","06:50:31","EOR","<<F3>>"

"Emp","63","Department","87","05-24-2008","06:50:37","Process","A","87",
"Item","92","QTY","55"
"Emp","63","Department","87","05-24-2008","06:50:37","Process","A","87",
"Item","63","QTY","99"
"Emp","63","Department","87","05-24-2008","06:50:37","Process","A","87",
"Item","15","QTY","55","06:50:50","<<F3>>"

"Emp","92","Department","15","05-25-2008","14:30:34","Process","D",”Work
Order”,"Y" ,”Work Order ID”, "63","4","Equip ID","11232","N","14:31:11"
"Emp","92","Department","15","05-25-2008","14:31:20","Process","D",”Work
Order”,"N" ,"Equip ID","92","Parts Required?","Y","Item","BB716","QTY","88"
"Emp","92","Department","15","05-25-2008","14:31:20","Process","D","N","Equip
ID","92","Parts Required?","Y","Item","AC627","QTY","44"
"Emp","92","Department","15","05-25-2008","14:31:20","Process","D","N","Equip
ID","92","Parts Required?","Y","Item","AD712","QTY","99","14:31:55"

Any help would be greatly appreciated
pietlinden@hotmail.com - 25 May 2008 20:56 GMT
> Hello,
>
[quoted text clipped - 38 lines]
> --
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200805/1

create an import specification by running an import and saving it.
Click on advanced when you go through the process the first time.
then make sure you specify the right delimiters.  then it should be
simple.  Just use TransferText.
Russ - 25 May 2008 22:17 GMT
Thanks, but really looking for a way to maybe read line by line and look for
error pior to importing the information.
Not really sure what the best way to tackle this.

>> Hello,
>>
[quoted text clipped - 6 lines]
>then make sure you specify the right delimiters.  then it should be
>simple.  Just use TransferText.
pietlinden@hotmail.com - 27 May 2008 17:45 GMT
> Thanks, but really looking for a way to maybe read line by line and look for
> error pior to importing the information.
[quoted text clipped - 14 lines]
> --
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200805/1

I think Chuck Grimsby has a module on Access Web that reads text files
line by line.  then you could examine the line (it's stored in a
string variable) and do something with it.
www.mvps.org/access
should be in the Modules section.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.