M
Mark
I have inherited an Access-97 database that has run fine
for some time. The front end is on two local computers
with the backend on a network. Computer 1 running windows
95 still works fine with the package. Computer 2 has been
replaced by a new machine running Windows 2000 and Access-
97. This upgraded machine no longer works correctly when
data is exported to Word-97.
On an entry form there is a button that exports data to a
word file and creates a purchase order in Word. When this
button is clicked from the Win-2000 machine the following
error is created:
"The expression on Click you entered as the event proerty
setting produced the following error
The expression may not result in the name of a macro, the
name of a user-defined function or [Event Procedure]
There may have been an error evaluating the funtion event
or macro"
It also generates the error "Runtime error 5981 Could not
open macro storage"
The error debug button points to the last line listed
below as the culprit. I've included several other lines
of code that may help
'***** this code at top of module
Public const gconTemplate as String("C:\Purchasing\PO.dot")
' I checked, and this file does exist
'******* This code is in on click event (not entire
listing of code...)
Set objW = New Word.Application
Set objW.visible = true
Set objDoc = objW.Documents.Add(gconTemplate)
This last line is the one flagged as an error.
Since the code works okay on the Win-95 machine, I suspect
that a reference or library somewhere is not set
properly. Any suggestions appreciated.
Mark
for some time. The front end is on two local computers
with the backend on a network. Computer 1 running windows
95 still works fine with the package. Computer 2 has been
replaced by a new machine running Windows 2000 and Access-
97. This upgraded machine no longer works correctly when
data is exported to Word-97.
On an entry form there is a button that exports data to a
word file and creates a purchase order in Word. When this
button is clicked from the Win-2000 machine the following
error is created:
"The expression on Click you entered as the event proerty
setting produced the following error
The expression may not result in the name of a macro, the
name of a user-defined function or [Event Procedure]
There may have been an error evaluating the funtion event
or macro"
It also generates the error "Runtime error 5981 Could not
open macro storage"
The error debug button points to the last line listed
below as the culprit. I've included several other lines
of code that may help
'***** this code at top of module
Public const gconTemplate as String("C:\Purchasing\PO.dot")
' I checked, and this file does exist
'******* This code is in on click event (not entire
listing of code...)
Set objW = New Word.Application
Set objW.visible = true
Set objDoc = objW.Documents.Add(gconTemplate)
This last line is the one flagged as an error.
Since the code works okay on the Win-95 machine, I suspect
that a reference or library somewhere is not set
properly. Any suggestions appreciated.
Mark