Text Import Specification Missing

M

MjMullen

I'm trying to automate a text import in Access 2007 using VBA
(doCmd.transferText) and am getting an error message that the text import
specifiation does not exist, although it appears and runs on the "saved
Imports" screen from the external data tab, and the query will run.

Any ideas how to (1) find the saved import specifications in VBA and add
this one to the collection, or (2) how to save a new import specification in
a way that can be found by VBA?
 
A

Allen Browne

If this database started out in an earlier version of Access, you can import
it from the old MDB by clicking:
- External Data tab of the ribbon
- Access on the Import chunk
- Select the MDB file, and click Ok.
- In the Import Objects dialog, click the Options button.
- Check the box for Import/Export Specs, and click Ok.

If you can't find it to import, you can create one by manually stepping
through an import. The Import Text wizard has an advanced button that lets
you save the import specs.
 
M

MjMullen

Allen,

Unfortunately, this database started out as a 2007 application, on a Vista
Ultimate machine.

To validate the process, I created a fresh database.
I ran the text import wizard twice, once to create the table (TextTest01)
and once to append a record to the table (TextText02)

Although the two specifications showed, neither was callable from VBA.

I stepped through a third text import and used the advanced tab, with save
as at the last screen (where the only option was "finish").

On this fresh database, the routine completed without error (on the old one
I recieved a "no current record" error) - and presented me with the famaliar
"save this specification" screen.

Being careful to change the specification name to the one I used in the
advanced screens (TextTest03) I saved the import.

And, wonder of wonders, the VBA routine CAN find that spec.

So, first, thanks for your advice - the MVP tag is certainly true. I can
now import the test routine into my prototype db.

Next, how do I provide the Office Team with input on this issue for the
release after 2010 (which is already baked)?

I hope this post will help others struggling in the same problem.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top