Link to home
Start Free TrialLog in
Avatar of longhorn03
longhorn03

asked on

TransferText Problem

I'm writing a VB Program that allows me to transfer data from a fixed width log file to an Access Database.

I'm getting the following error with my TransferText line:

DoCmd.TransferText acImportFixed, "ReaderSpec", "Data3", "H:\EE 464H\Sentinel020320032130.txt", True

acImportFixed - Variable not declared.


Is there a Reference I need to include in order to get this to be declared?  I'm new to VB and am stumped.

Thanks,

J
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

replace the constant by its value
Avatar of longhorn03
longhorn03

ASKER

where can I find that value?
its value is 1
Are you writing a VB program or a VBA program?  If you're in an Access database, it's VBA and the constant should work.  If you running VB (VB 6.0, etc) then a lot of your code isn't going to work.
I'm running VB 6.0.  Would it be easier to simply do a line-by-line insertion of data into the database?

And why do you say that a lot of the code isn't going to work?

Thanks,

J
ASKER CERTIFIED SOLUTION
Avatar of MN_Dave
MN_Dave
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And all users of your application will need to have Access installed on their PCs.
Unfortunately, my preferred solution isn't working out.  However, this is the code that showed me this unfortunate fact.  Thanks for you help, everyone, I'm going to go another direction with this.

-Jonathan
well......you may view the priority to reference, and you can agreed the reference Microsoft Componets......

OK