ServerFilter Subform

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top