Locating a file with code.

C

CD Tom

In my application I have a backup that exports the data to a .txt file. This
allows the user to take the data to another computer and restore that data.
This works great and don't have any problems with that part of the program.
The problem is that before the restore works I want to be sure that the file
is where the user points. I have setup a code to look for the file first and
if it isn't where the user pointed they will get an error message that no
backup file was found. I am using the fReturnFilePath module. This works
fine on my machine but when I sent the program to my user when ever he tries
to do the restore he gets the error message I put out about not having any
backup files. I've connected to his machine and look in the folder where he
has his back and everything is there. After this long explanination does
anybody have any clue as to why this will not work on his computer.
Any suggestions as to what to try would be greatly appreciated.
Thanks.
 
B

Bob Quintal

In my application I have a backup that exports the data to a .txt
file. This allows the user to take the data to another computer
and restore that data. This works great and don't have any
problems with that part of the program. The problem is that
before the restore works I want to be sure that the file is where
the user points. I have setup a code to look for the file first
and if it isn't where the user pointed they will get an error
message that no backup file was found. I am using the
fReturnFilePath module. This works fine on my machine but when I
sent the program to my user when ever he tries to do the restore
he gets the error message I put out about not having any backup
files. I've connected to his machine and look in the folder where
he has his back and everything is there. After this long
explanination does anybody have any clue as to why this will not
work on his computer. Any suggestions as to what to try would be
greatly appreciated. Thanks.
the page where I found a copy of freturnFilePath had this note

"Before using the code, make sure "Microsoft Office 8.0 Object
Library" (typically referenced to MSO97.DLL under Office folder) is
selected under Tools/References."

so it may be a missing reference.

I prefer to make the user brose for and select the file using
ahtCommonFileOpenSave() from http://mvps.org/access/api/api0001.htm
 

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

Similar Threads


Top