Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link tables to user defined path

Status
Not open for further replies.

bustersports

Programmer
Sep 25, 2002
92
0
0
US
Hi,

I am attempting to have tables reattach to another table when a user logs in as well as having ability to see a help file. I cannot define the path since not all users are able to create directories except under their respective login name (C:\Documents and Settings\JohnDoe\My Documents\). I am having problems when it comes to always getting the correct path. I am using the following code, but it is not consistent. Sometimes I will get C:\Documents and Settings\JohnDoe\My Documents\ even when the file is opened from c:\test. I would expect it to be showing c:\test as the path.

Private Sub Form_Open(Cancel As Integer)

Dim MyPath
Dim File
Dim PathFilename

MyPath = CurDir
File = "Help File.chm"
PathFilename = MyPath & "\" & [File]

[txtPath] = MyPath
[txtFile] = File
[txtPathFileName] = PathFilename
End Sub

The [txt...] is only used for me to verify it is working, I will delete them once I am satisfied it is working.

Does anyone have any clues? Hopefully this will be enough information. Thanks in advance.
 
I have figured out the problem. Thanks to anyone who read and thought of how to fix it.
 
Could you post what the solution was so that others who find this could benefit without have to repost?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top