On a form I have created a command button that opens a Word file called "Instructions for Inventory Program". I've discovered that, if the file has been moved, deleted, or renamed, Access gives the user an unfriendly message and leaves Word open. I want to replace the message Access displays with a more friendly and understandable message of my own. I've tried everything I can think of with no luck. For now, I've placed a message at the beginning of the procedure, but they have to see this every time. I only want a message to be shown if the file is not found.
I'd really appreciate any suggestions as to where and how I can get Access to display my message at the appropriate time in the procedure, and only if the file is not found.
Here is the code I'm using right now:
Private Sub View_manual_button_Click()
MsgBox "If the Instruction manual can not be found you will receive an error message." & vbCrLf & vbCrLf & "IMPORTANT: If the file can not be found you must immediately close Word to prevent futher error messages."
On Error GoTo Err_View_manual_button_Click
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Exit_View_manual_button_Click:
Exit Sub
Err_View_manual_button_Click:
MsgBox Err.Number
Resume Exit_View_manual_button_Click
End Sub