bonekrusher
Registered User.
- Local time
- Today, 15:10
- Joined
- Nov 19, 2005
- Messages
- 266
Hi Everyone,
I have a code to open a file. The Code gets the file name from a field called "tbFile". The users that need to access this file and open it are on a server and have mapped their drives with different letters. So I want the Code to be used from anyones computer.
How do I incorperate the "Path = Me.Application.CurrentProject.Path" function to retrieve the file?
I have a code to open a file. The Code gets the file name from a field called "tbFile". The users that need to access this file and open it are on a server and have mapped their drives with different letters. So I want the Code to be used from anyones computer.
How do I incorperate the "Path = Me.Application.CurrentProject.Path" function to retrieve the file?
Code:
Private Sub bOpenFile_Click()
On Error GoTo Err_bOpen_Click
Me.tbHidden.SetFocus
If IsNull(tbFile) Or tbFile = "" Then
MsgBox "Please browse and select a valid file to open.", vbCritical, "Invalid File"
Else
OpenFile (tbFile)
End If
Exit_bOpen_Click:
Exit Sub
Err_bOpen_Click:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_bOpen_Click
End Sub