Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

Access 97 - Automating TransferText not working

Okay, this is rather annoying.  I am trying to import data from a text file, fixed field format into my Access 97 database.  There are three files - File1.txt, File2.txt, and File3.txt (File3.txt is not always there).  I have written a macro that does a TransferText using an import specification (Shiva Import Specification) for File2.txt & File3.txt, which are in the same format.  File1.txt is also brought in using a TransferText with an import specification, and it works fine (it is formatted differently).

If I do this by hand using the same specification into the same table(File,Get External data,  Import, Select the text file, Advanced, Specs, Shiva Import Specification, and keep clicking Okay) it works fine.

Put the same information into a TransferText line on a macro, and I get this error:

Numeric Field Overflow, Which it associates with a BTrieve table.

Not sure why I'd get the error doing with a macro what I do by hand.  I do some screening on it to ensure the file exists (and that is working), but the error is driving me nuts.  Any suggestions?  Thanks.
0
kaldrich
Asked:
kaldrich
  • 2
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
It's hard not to think of Access as one big program, but it's really made up of three: Access UI, VBA, and JET.

You get a difference because you really are doing it two different ways.  One is through the Access UI, the other through VBA.

I'd try setting up a schema.ini file for the import file. Here's a MSKB link:

http://support.microsoft.com/support/kb/articles/Q149/0/90.asp

HTH,
Jim.

0
 
amp072397Commented:
kaldrich hasn't logged in since early November. Points will be awarded to JDettman in about 7 days unless kaldrich returns with a viable objection.

thanks!
amp
community support moderator
0
 
amp072397Commented:
Points to JDettman.
amp
community support moderator
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now