OnClick error

razorkat99

Still figurin' it out
Local time
Today, 12:31
Joined
Oct 22, 2007
Messages
35
I have a command button that I created with the wizard and put on the main window form to open a data entry form that has a subform in it and when I click on the button I get the following error:

"a problem occurred while Microsoft Access was communicating with the OLE server or ActiveX control..."

The code is as follows:

Private Sub Command4_Click()
On Error GoTo Err_Command4_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "CustCallsDataEntry Frm"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command4_Click:
Exit Sub

Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click

End Sub

This code is written just like command button codes I have in my other DB that works just fine, so I'm not sure why this one isn't working. Thoughts?
 
when I click on the button I get the following error:

"a problem occurred while Microsoft Access was communicating with the OLE server or ActiveX control..."

This code is written just like command button codes I have in my other DB that works just fine, so I'm not sure why this one isn't working. Thoughts?
Do you have any pictures in the form that is supposed to popup? Access has to communicate with the server to load your images. That may be the problem, or you may have a corrupt .dll file floating around. I really don't have any idea about how to fix this type of thing...just throwing you some ideas. If you've got a corrupt file or missing file situation, you might have to reinstall Access completely, but I'm not sure about that....
 

Users who are viewing this thread

Back
Top Bottom