transfertext question (1 Viewer)

jatfill

Registered User.
Local time
Today, 12:00
Joined
Jun 4, 2001
Messages
150
hello all,

I'm writing a procedure that transfers an error log (the log is in text format) into an Access table, so that users can generate summary reports an analyze generated errors

I've written the import specs, and they work fine.

The only problem is, the error log is written automatically from another application, and is given an extension of .SGL, even though it is a standard text file. The file name varies with each generated log file (except the extension) so the form I built has a file select dialog.

The transfer text process will not recognize the .SGL file, it returns a "file is read only" error... but if I manually rename the file and change the .SGL to .txt, it works fine.

Does anyone know of a way I can either...

a.) automatically rename the selected file & change the extension.

b.) get Access to recognize an .SGL text fileas a valid import format


Thanks in advance!
 

bauer

Registered User.
Local time
Today, 12:00
Joined
Aug 23, 2001
Messages
77
editing the registry key

I've been trying to figure out if there is anyway to edit the registry key that that article talks about. I found the get settings and save settings, but that's only good for the VBA folder in the registry. I need the Microsoft one.


Thanks for any and all help
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:00
Joined
Feb 19, 2002
Messages
43,424
Look up the Name Statement. It is used to rename a file.

Name oldpathname As newpathname
 

bauer

Registered User.
Local time
Today, 12:00
Joined
Aug 23, 2001
Messages
77
Thank you.

It turned out I had to edit the file I was using the transfertext, so I used the write statement to write to the .dat file.
And then all was good.

Thank you again
 

Users who are viewing this thread

Top Bottom