Docmd.TransferText fails to create new table

  • Thread starter Thread starter Rich K
  • Start date Start date
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?
 
Define "fails to work"
Computer melts into ozzing puddle of plastic?
Nothing imported?
An error message is displayed?
 
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?
 
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?
 
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?
 
Back
Top