Denise2020
Member
- Local time
- Today, 07:28
- Joined
- Mar 31, 2020
- Messages
- 82
Good afternoon all,
I have a form with a "Reference" text box with a button. The button currently has VBA to open a specific folder where files can be found for each record as default, if the text box is empty. This part works without any problems.
What I would like to happen though, is if a specific file is typed into the reference text box, that it searches in that folder for the specific file and opens it.
My simple VBA code is:
Private sub btnOpenRef_Click()
Application.FollowHyperlink "... specific folder location in explorer listed here" & Me.Referens
End Sub
Private sub btnOpenRef_Click()
Application.FollowHyperlink "... specific folder location in explorer listed here" & Me![Referens]
End Sub
I have tried tacking on the text box at the end as show in red, but so far not found something that works. Is there a way to do this? Thank you so much for the help.
I have a form with a "Reference" text box with a button. The button currently has VBA to open a specific folder where files can be found for each record as default, if the text box is empty. This part works without any problems.
What I would like to happen though, is if a specific file is typed into the reference text box, that it searches in that folder for the specific file and opens it.
My simple VBA code is:
Private sub btnOpenRef_Click()
Application.FollowHyperlink "... specific folder location in explorer listed here" & Me.Referens
End Sub
Private sub btnOpenRef_Click()
Application.FollowHyperlink "... specific folder location in explorer listed here" & Me![Referens]
End Sub
I have tried tacking on the text box at the end as show in red, but so far not found something that works. Is there a way to do this? Thank you so much for the help.