Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need code for recursive ASCII processing

Status
Not open for further replies.

PaulRAmes

Technical User
Nov 14, 2002
5
US
I need to process (run some queries on) data from a series of ASCII files. I have the list of filenames to process in a table. How do I write code to select the proper database, open the table with the filenames, and loop through each name in the table until the last one, running the queries on each? I think I need code for this because my attempts to do this with queries alone has not worked. I'm new to modules, but have written VBA procedures for forms, etc. Any help will be greatly appreciated!
Thanks,
Paul

 
You can use Opendatabase to open a database; a recordset will allow you to loop through a table; TransferText will allow you to attach the table; and CurrentDB.Execute or CurrentDB.RunSQL or DoCmd.OpenQuery will allow you to run a query.
 

Opendatabase is needed if you do that from a different mdb.
CurrentDB (DAO) and CurrentProject.Connection (ADO) refer to your currently open database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top