G
GitarJake
Hello All,
I keep getting the following error when I try to open a pop-up form from a
sub-form:
The expression On Click you entered as the event property setting produced
the following error: A problem occurred while the Database 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 evaluating the function, event, or macro.
Here is the On Click VBA:
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmNotes"
stLinkCriteria = "[RecordID]=" & Me![RecordID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub
The references are as follows:
Visual Basic for Applications
MS Access 9.0 Object Library
OLE Automation
MS Calendar Control 9.0
MS ActiveX Data Objects 2.1 Library
I know I've done this before. Exactly the same way. Why doesn't this
work?
TIA,
Jake
I keep getting the following error when I try to open a pop-up form from a
sub-form:
The expression On Click you entered as the event property setting produced
the following error: A problem occurred while the Database 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 evaluating the function, event, or macro.
Here is the On Click VBA:
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmNotes"
stLinkCriteria = "[RecordID]=" & Me![RecordID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub
The references are as follows:
Visual Basic for Applications
MS Access 9.0 Object Library
OLE Automation
MS Calendar Control 9.0
MS ActiveX Data Objects 2.1 Library
I know I've done this before. Exactly the same way. Why doesn't this
work?
TIA,
Jake