Transfer Database - DAT files

  • Thread starter Mitchell_Collen via AccessMonster.com
  • Start date
M

Mitchell_Collen via AccessMonster.com

Hi everyone.

I want to use the 'transfer database' option in a macro. I am wanting to grab
files that are imported on another system with other software that is limited
to reports and convert those files to tables so that I can write reports on
the data. The problem is that the files are DAT files. Do you think there is
a way to import these? I can manually turn these files into text files and
then import them. But, I figured maybe someone has a better way to do this.
Please help me.

Thanks, Misty
 
S

Steve Schapel

Misty,

When you say "manually turn these files into text files", do you mean
just rename them to a .txt filename extension, or is there some other
process involved?

If it's just a matter of renaming them, you can automate that from
Access... but not in a macro, I'm afraid, you would need to use a VBA
procedure instead.

Are you using TransferDatabase action, or TransferText?
 
M

Mitchell_Collen via AccessMonster.com

Hi Steve. Thanks for replying.

When I rename the file it won't convert to a text. I have to open with
notepad and then save as a text file. Then I import the text into the Access
Database.

I have never used the transfer text or transfer database, I just figured that
would be the way I could import . I don't know how to write many vba files. I
have copied over 2-5 line macros before but that's the extent of my knowledge
on that.

Misty
 
S

Steve Schapel

Misty,

There is one of these newsgroups for Access called Externaldata. I
think I will advise you to pop over there, you might have a better
chance of a good answer. ;-) In fact, I am cross-posting this reply
over there.

Renaming the .dat file to .txt doesn't work, but opening the .dat file
in Notepad and saving as .txt does work - ok, I suppose what could be
happening there is that opening the .dat file in Notepad results in some
special characters being stripped out, which are otherwise interfering
with the transfer into your Access database. But that's only a guess.

It would be possible to write some VBA procedure which does the "open in
Notepad, save as .txt" routine. This is beyond the scope of what you
can do with a macro. Whether it is worth going to the trouble will
partly depend, I suppose, on whether this is an occasional requirement,
or an on-going repeated task.
 
M

Mitchell_Collen via AccessMonster.com

Steve.
I didn't know of the newsgroup. I will go to that area.
Thanks again for the advice and reposting!!
Misty
 

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