J
Jason
Just got a new computer - running MS Access 2002 (I'm wondering if maybe I
need to activate some reference libraries?)
I have the following code on the dbl click event of a list box:
Private Sub lstSOP_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
Dim Criteria As String
Dim i As Variant
' Build criteria string from selected items in list box.
Criteria = ""
For Each i In Me![lstSOP].ItemsSelected
If Criteria <> "" Then
Criteria = Criteria & " OR "
End If
Criteria = Criteria & "[SOP]=" & Me![lstVisits].ItemData(i)
Next i
stDocName = "frmTest"
stLinkCriteria = Criteria
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
When I double click, I get the following error:
The expression On Dbl Click you entered as the event property setting
produced the following error: A problem occurred while Microsoft 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 evaluating the function, event, or macro.
Any help you can provide is appreciated!
need to activate some reference libraries?)
I have the following code on the dbl click event of a list box:
Private Sub lstSOP_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
Dim Criteria As String
Dim i As Variant
' Build criteria string from selected items in list box.
Criteria = ""
For Each i In Me![lstSOP].ItemsSelected
If Criteria <> "" Then
Criteria = Criteria & " OR "
End If
Criteria = Criteria & "[SOP]=" & Me![lstVisits].ItemData(i)
Next i
stDocName = "frmTest"
stLinkCriteria = Criteria
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
When I double click, I get the following error:
The expression On Dbl Click you entered as the event property setting
produced the following error: A problem occurred while Microsoft 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 evaluating the function, event, or macro.
Any help you can provide is appreciated!