M
makulski
I have an adp (2003) connected to SQL server (2005).
I've added this double-click event to filter on a selected field:
Public Function FilterbySelection()
Dim MyFilterControl As Control, MyFilter As String
Set MyFilterControl = Me.ActiveControl
Me.ServerFilter = Me.ServerFilter & " and " &
MyFilterControl.Properties("ControlSource") & "='" & MyFilterControl & "'"
Me.Refresh
End Function
It adds to a ServerFilter the cuurent value of the current field.
It works great on a control on a form.
But, it doesn't work when that form is a subform on another form.
I've tested that the event is firing off when the subform field is double
clicked, and that the serverfilter is getting the correct values. It just
doesn't do the filter.
Help!
I've added this double-click event to filter on a selected field:
Public Function FilterbySelection()
Dim MyFilterControl As Control, MyFilter As String
Set MyFilterControl = Me.ActiveControl
Me.ServerFilter = Me.ServerFilter & " and " &
MyFilterControl.Properties("ControlSource") & "='" & MyFilterControl & "'"
Me.Refresh
End Function
It adds to a ServerFilter the cuurent value of the current field.
It works great on a control on a form.
But, it doesn't work when that form is a subform on another form.
I've tested that the event is firing off when the subform field is double
clicked, and that the serverfilter is getting the correct values. It just
doesn't do the filter.
Help!