Open a WORD document based ona value in a textbox

jboyle

New member
Local time
Today, 06:47
Joined
Nov 18, 2000
Messages
53
I have a form that displays data related to a manufacturing process. If the process name is "Build Motor" displayed in the textbox, then I want to hit a button to have Access launch WORD and open a file named exactley the same name Build Motor.DOC

If the process name being displayed is something different then I want it to open WORD to that document name.
Thanks in advance - John
 
This should work. add it to the command button, and customise names, file location etc


Private Sub Command2_Click()

'Create variable to hold value in textbox control, the name of the help file
vardoc = Me!TextBoxName.Value

'open the file.
FollowHyperlink ("C:\WINDOWS\Desktop\" & vardoc & ".doc")

End Sub

Meltdown
\\\/////
~ ~
@ @
<
\__/
 

Users who are viewing this thread

Back
Top Bottom