Docmd.TransferText fails to create new table

R

Rich K

A colleague recently converted an Access 97 mdb to Access 2000.

A process that deletes tables and recreates them while importing data fails
to work. I believe I've resolved the issue down to this statement:

DoCmd.TransferText acImportFixed, "Import_HED", "TI_HED",
Concat_Dir_File(Me![Directory_Location], Me![Collar_ID]) & ".HED", False

Concat_Dir_File is a local sub that creates the file location and name. That
works just fine.

Any ideas on why this would work in '97 and not 2000?

What is the meaning of the specification? Would it be in a file, or is it
set internally in Access?
 
K

Klatuu

Define "fails to work"
Computer melts into ozzing puddle of plastic?
Nothing imported?
An error message is displayed?
 
R

Rich K

Fails to create the new table(s). The process appears to run through several
statements similar to the one I posted and as far as I can tell the process
fails because the tables are not created. The table creation works in the
'97 version but not in the 2000 version that was recently created. I suspect
it has to do with the "specification" property in the TransferText action,
but I'm not sure how to view the specification properties.


I have tried to import these from the '97 version but the import fails.

Klatuu said:
Define "fails to work"
Computer melts into ozzing puddle of plastic?
Nothing imported?
An error message is displayed?

--
Dave Hargis, Microsoft Access MVP


Rich K said:
A colleague recently converted an Access 97 mdb to Access 2000.

A process that deletes tables and recreates them while importing data fails
to work. I believe I've resolved the issue down to this statement:

DoCmd.TransferText acImportFixed, "Import_HED", "TI_HED",
Concat_Dir_File(Me![Directory_Location], Me![Collar_ID]) & ".HED", False

Concat_Dir_File is a local sub that creates the file location and name. That
works just fine.

Any ideas on why this would work in '97 and not 2000?

What is the meaning of the specification? Would it be in a file, or is it
set internally in Access?
 
K

Klatuu

That's kind of what I suspected.
You can see the import spec by starting the transfer manually File, Get
External Data, Import.
Select text files. Then navigate to a file you would import with this spec.
Import Text Wizard appears.
Click on Advanced (lower left)
Click on Specs.
Select one you want to use.
It may need some editing.
--
Dave Hargis, Microsoft Access MVP


Rich K said:
Fails to create the new table(s). The process appears to run through several
statements similar to the one I posted and as far as I can tell the process
fails because the tables are not created. The table creation works in the
'97 version but not in the 2000 version that was recently created. I suspect
it has to do with the "specification" property in the TransferText action,
but I'm not sure how to view the specification properties.


I have tried to import these from the '97 version but the import fails.

Klatuu said:
Define "fails to work"
Computer melts into ozzing puddle of plastic?
Nothing imported?
An error message is displayed?

--
Dave Hargis, Microsoft Access MVP


Rich K said:
A colleague recently converted an Access 97 mdb to Access 2000.

A process that deletes tables and recreates them while importing data fails
to work. I believe I've resolved the issue down to this statement:

DoCmd.TransferText acImportFixed, "Import_HED", "TI_HED",
Concat_Dir_File(Me![Directory_Location], Me![Collar_ID]) & ".HED", False

Concat_Dir_File is a local sub that creates the file location and name. That
works just fine.

Any ideas on why this would work in '97 and not 2000?

What is the meaning of the specification? Would it be in a file, or is it
set internally in Access?
 
R

Rich K

Thanks for the help Dave.

Turns out that following your instructions helped me figure out what the
real issue was. The source files do not have a regular extension, and Access
2000 won't import file extensions for unknown types.

http://support.microsoft.com/?id=306144

I've implemented 'Method 2' (without the registry hacks) and so far it
seems to be importing.

Thanks.

Klatuu said:
That's kind of what I suspected.
You can see the import spec by starting the transfer manually File, Get
External Data, Import.
Select text files. Then navigate to a file you would import with this spec.
Import Text Wizard appears.
Click on Advanced (lower left)
Click on Specs.
Select one you want to use.
It may need some editing.
--
Dave Hargis, Microsoft Access MVP


Rich K said:
Fails to create the new table(s). The process appears to run through several
statements similar to the one I posted and as far as I can tell the process
fails because the tables are not created. The table creation works in the
'97 version but not in the 2000 version that was recently created. I suspect
it has to do with the "specification" property in the TransferText action,
but I'm not sure how to view the specification properties.


I have tried to import these from the '97 version but the import fails.

Klatuu said:
Define "fails to work"
Computer melts into ozzing puddle of plastic?
Nothing imported?
An error message is displayed?

--
Dave Hargis, Microsoft Access MVP


:

A colleague recently converted an Access 97 mdb to Access 2000.

A process that deletes tables and recreates them while importing data fails
to work. I believe I've resolved the issue down to this statement:

DoCmd.TransferText acImportFixed, "Import_HED", "TI_HED",
Concat_Dir_File(Me![Directory_Location], Me![Collar_ID]) & ".HED", False

Concat_Dir_File is a local sub that creates the file location and name. That
works just fine.

Any ideas on why this would work in '97 and not 2000?

What is the meaning of the specification? Would it be in a file, or is it
set internally in Access?
 

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