bustersports
Programmer
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 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.