PDA

View Full Version : docmd.transfertext import specification query



lazyme
04-19-2010, 01:32 PM
I am using docmd.transfertext to import text files into my access database. The format of the text files is


"C Programming Language (2nd Edition)", "0131103628", "Available in Loom Library", "274 pages"
"Head First Java, 2nd Edition", "0596009208", "Not available in Loom library", "688 pages"
I want the entries in the databases to be as


C Programming Language(2nd Edition) 0131103628 In stock 274 pages
Head First Java 2nd Edition 0596009208 Out of stock 688 pages

Is there a way I can specify in the import specification that I want the text "Available in Loom Library" to be changed to "In Stock" and the text "Not available in Loom library" to be changed to "Out Of Stock"?

Thanks

OBP
04-20-2010, 04:52 AM
I would carry out the Import first, either to a temporary table or to the actual table and then run simple Update Queries to change the text to what you want.
It can all be done using VBA Code so there is no extar work for the User.

CreganTur
04-21-2010, 06:32 AM
On the other hand, I think that you can create a Shema.ini file to handle those kinds of specifications. I'm rusty on that, so google would be your friend.

lazyme
05-04-2010, 02:02 PM
Thanks. I will try these approaches.