paulnnosh
MIS
- Mar 25, 2004
- 32
Hi,
I am trying to filter a subform based upon the selected entry in a combo box. I have a button that has the following code:
Private Sub ButFilter_Click()
Dim strFilter As String
strFilter = ""
If (Not IsNull(Me![CboSource])) Then
strFilter = "([Source] = " & Str(Me![CboSource]) & ")"
End If
If Len(strFilter) Then
Forms![Prospects subform].Filter = strFilter
Forms![Prospects subform].FilterOn = True
End If
End Sub
When I click the button to apply the filter I get the following error message:
The expression On Click you entered as the event property setting produced the following error: A problem occured 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.
Can anyone shed any light on this?
Thanks a lot.
I am trying to filter a subform based upon the selected entry in a combo box. I have a button that has the following code:
Private Sub ButFilter_Click()
Dim strFilter As String
strFilter = ""
If (Not IsNull(Me![CboSource])) Then
strFilter = "([Source] = " & Str(Me![CboSource]) & ")"
End If
If Len(strFilter) Then
Forms![Prospects subform].Filter = strFilter
Forms![Prospects subform].FilterOn = True
End If
End Sub
When I click the button to apply the filter I get the following error message:
The expression On Click you entered as the event property setting produced the following error: A problem occured 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.
Can anyone shed any light on this?
Thanks a lot.