S
Stephen @ ZennHAUS
Hi Guys and Gals
I have a database that was originally created in Access 2000, then modified
in 2003 before I got it. I have since upgraded it to a 2003 format file and
it has since been modified in both Access 2003 and 2007 depending on what I
was doing.
All of the original objects have been deleted after migrating old data to
new tables to remove design flaws.
Finally, I am at the stage of creating forms. I created a couple of minor
forms in Access 2007 along with the main menu which is just a blank form
that I have added buttons to. The forms works fine in Access 2007, but when
opened in Access 2003 on the same computer, Access 2003 fails and shuts
down. So, I deleted the forms from 2007 and recreated them in Access 2003.
It doesn't crash anymore, but I get the following error.
"Microsoft Office Access
The expression On Click you entered as the event property setting produced
the following error: A problem occurred while Microsoft Office Access was
communicating with the OLE server or ActiveX Control.
*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 evaluation the function, event, or macro."
It includes a Show Help >> button and an OK button.
The detail in the Show Help>> button says:
Visual Basic for Applications (VBA) encountered a problem while attempting
to access a property or method. The problem may be one of the following:
* A reference is missing.
* For help restoring missing references, see the Microsoft Knowledge Base
article 283806.
* An Expression is misspelled.
* Check all expressions used in event properties for correct spelling.
* A user-defined function is declared as a sub or as a private function in a
module.
* Expressions can resolve a user-defined function only if the function is
declared as one of the following:
* A public function in a module
* A public or private function in a code module of the current form or
report
* Security in Access is set to Medium or High and the Microsoft Jet 4.0 SP8
update is not installed.
* A more recent version of Jet 4.0 must be installed for Access to function
properly when security is set to Medium or High. To obtain the latest
version of Microsoft Jet, go to Windows Update.
I have already checked the references in the VBA project and they are as
follows:
* Visual Basic for Applications
* Microsoft Access 11.0 Object Library
* Microsoft DAO 3.6 Object Library
* Microsoft ActiveX Data Objects 2.1 Library
* OLE Automations
I have also changed the security to Low and made sure that Jet 4.0 is up to
date. The code syntax matches that of reference guide and in fact the code
was written by the Button control wizard.
The code is as follows:
Private Sub cmdProduction_Click()
On Error GoTo Err_cmdProduction_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProduction"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdProduction_Click:
Exit Sub
Err_cmdProduction_Click:
MsgBox Err.Description
Resume Exit_cmdProduction_Click
End Sub
I also changed it to the following to simplify it in the hope that would
make a difference.
Private Sub cmdProduction_Click()
On Error GoTo Err_cmdProduction_Click
DoCmd.OpenForm "frmProduction"
Exit_cmdProduction_Click:
Exit Sub
Err_cmdProduction_Click:
MsgBox Err.Description
Resume Exit_cmdProduction_Click
End Sub
This is really doing my head in because I have done all of this countless
times before and it has always worked. I have even tried this on other
computers with only Access 2003 and I have tried other projects I have built
in the past that worked and it all fails.
I know it's a lot that I have written, but I wanted to provide as much
detail as possible.
Cheers,
Stephen @ ZennHAUS
I have a database that was originally created in Access 2000, then modified
in 2003 before I got it. I have since upgraded it to a 2003 format file and
it has since been modified in both Access 2003 and 2007 depending on what I
was doing.
All of the original objects have been deleted after migrating old data to
new tables to remove design flaws.
Finally, I am at the stage of creating forms. I created a couple of minor
forms in Access 2007 along with the main menu which is just a blank form
that I have added buttons to. The forms works fine in Access 2007, but when
opened in Access 2003 on the same computer, Access 2003 fails and shuts
down. So, I deleted the forms from 2007 and recreated them in Access 2003.
It doesn't crash anymore, but I get the following error.
"Microsoft Office Access
The expression On Click you entered as the event property setting produced
the following error: A problem occurred while Microsoft Office Access was
communicating with the OLE server or ActiveX Control.
*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 evaluation the function, event, or macro."
It includes a Show Help >> button and an OK button.
The detail in the Show Help>> button says:
Visual Basic for Applications (VBA) encountered a problem while attempting
to access a property or method. The problem may be one of the following:
* A reference is missing.
* For help restoring missing references, see the Microsoft Knowledge Base
article 283806.
* An Expression is misspelled.
* Check all expressions used in event properties for correct spelling.
* A user-defined function is declared as a sub or as a private function in a
module.
* Expressions can resolve a user-defined function only if the function is
declared as one of the following:
* A public function in a module
* A public or private function in a code module of the current form or
report
* Security in Access is set to Medium or High and the Microsoft Jet 4.0 SP8
update is not installed.
* A more recent version of Jet 4.0 must be installed for Access to function
properly when security is set to Medium or High. To obtain the latest
version of Microsoft Jet, go to Windows Update.
I have already checked the references in the VBA project and they are as
follows:
* Visual Basic for Applications
* Microsoft Access 11.0 Object Library
* Microsoft DAO 3.6 Object Library
* Microsoft ActiveX Data Objects 2.1 Library
* OLE Automations
I have also changed the security to Low and made sure that Jet 4.0 is up to
date. The code syntax matches that of reference guide and in fact the code
was written by the Button control wizard.
The code is as follows:
Private Sub cmdProduction_Click()
On Error GoTo Err_cmdProduction_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProduction"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdProduction_Click:
Exit Sub
Err_cmdProduction_Click:
MsgBox Err.Description
Resume Exit_cmdProduction_Click
End Sub
I also changed it to the following to simplify it in the hope that would
make a difference.
Private Sub cmdProduction_Click()
On Error GoTo Err_cmdProduction_Click
DoCmd.OpenForm "frmProduction"
Exit_cmdProduction_Click:
Exit Sub
Err_cmdProduction_Click:
MsgBox Err.Description
Resume Exit_cmdProduction_Click
End Sub
This is really doing my head in because I have done all of this countless
times before and it has always worked. I have even tried this on other
computers with only Access 2003 and I have tried other projects I have built
in the past that worked and it all fails.
I know it's a lot that I have written, but I wanted to provide as much
detail as possible.
Cheers,
Stephen @ ZennHAUS