Import Specification and TransferText (1 Viewer)

stepone

Registered User.
Local time
Today, 00:53
Joined
Mar 2, 2004
Messages
97
Hello everyone,

I've written a form to allow users to select a text file. I then use the transferText method (with a predefined Import Specification) within VBA to import the text file.

My question is - if I distribute this form to other users, do I need to set up the Import Specification individually on every instance of Access, or is there a way of including it within the application ?

Thanks,
Peter.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:53
Joined
Feb 19, 2002
Messages
43,546
The TransferDatabase Method/Action doesn't seem to recognise Import/Export Specs. You can import the specs when you go through the dialog manually.
 

fuzzygeek

Energy Ebbing
Local time
Today, 00:53
Joined
Mar 28, 2003
Messages
989
Back in Access 97, I had to automatically create a number of different databases. I had to transfer the import/export specs also. BEWARE that there were no specs in the newly created database so I was able to use the transferdatabase to export the tables that contain the specification information. These are hidden system tables that cannot be changed. So if the database you want to transfer the data to has no import/export specs, this may work. I had to find the original mdb to remember how I did it.
CAUTION
BEWARE this may cause problems if the target mdb has these tables. Experiment only on a copy of the db. (added)Also you are exporting all specs that you have(added). The example code is in VBA for 97:

'The following code transfers the import/export specification system files (with data) from _
the current database to the newly created database. False means that data is sent with _
the tables. True means table structure only.

DoCmd.TransferDatabase acExport, "Microsoft Access", _
DB_Path_Name, acTable, "MsysIMEXSpecs", _
"MsysIMEXSpecs", False

DoCmd.TransferDatabase acExport, "Microsoft Access", _
DB_Path_Name, acTable, "MsysIMEXColumns", _
"MsysIMEXColumns", False
 
Last edited:

ros794

New member
Local time
Today, 00:53
Joined
Oct 13, 2005
Messages
9
transfertext specification problem!

Hi I need some help,
I have a similar problem to this.

There is a working Macro on one database that uses transfertext to import a text file that has come from SAP.

The original query in the first database hasmany specification names available, but in my new database there are none.

How do I create a specification? or , how do i copy the specifications from the other database?

Thanks in advance for any help!

Rosx
 

fuzzygeek

Energy Ebbing
Local time
Today, 00:53
Joined
Mar 28, 2003
Messages
989
This is how you import the specs manually.

Open the new database that has no specs. Select File/Get External Data/Import. Then select the database that has the import specifications as the database to import from. A "Import Objects" Form will appear. At the botton right of the form will be an "Options" button. Click that Options button. Now at the lower left of the screen under "Import" is a check box for Import/Export Specs. Select that check box. Then hit OK. The import/export specs will be imported into your database.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:53
Joined
Feb 19, 2002
Messages
43,546
My answer to this question made absolutely no sense. I wonder what question I thought the poster was asking:confused:
 

Users who are viewing this thread

Top Bottom