G
Guest
Hi,
in my Access application I have a form with a subform both linked by the
master/child properties.
In the subforms header I have a combobox that allows the user to display a
subset of records that matches with the value in the combobox plus the values
of the current master/child properties.
I use the subforms ServerFilter property to apply the filter to the form.
My vba code in the subform:
Private Sub Form_Load()
Me.ServerFilter = vbNullString
End Sub
Private Sub Form_Close()
Me.ServerFilter = vbNullString
End Sub
Private Sub cmdlFilter_Click()
If Me!KomboDefaultOrga <> 0 Then
Me.ServerFilter = "ORGABAUM_ID = " & Me!KomboDefaultOrga
Me.Refresh
End If
End Sub
However, the code above has no effect on the resultset displayed in the
subform when sub cmdlFilter_Click runs. The subform displays only those
records matching the master/child properties values, not the value the user
selects in the subform.
Anyone has any ideas how to troubleshoot?
in my Access application I have a form with a subform both linked by the
master/child properties.
In the subforms header I have a combobox that allows the user to display a
subset of records that matches with the value in the combobox plus the values
of the current master/child properties.
I use the subforms ServerFilter property to apply the filter to the form.
My vba code in the subform:
Private Sub Form_Load()
Me.ServerFilter = vbNullString
End Sub
Private Sub Form_Close()
Me.ServerFilter = vbNullString
End Sub
Private Sub cmdlFilter_Click()
If Me!KomboDefaultOrga <> 0 Then
Me.ServerFilter = "ORGABAUM_ID = " & Me!KomboDefaultOrga
Me.Refresh
End If
End Sub
However, the code above has no effect on the resultset displayed in the
subform when sub cmdlFilter_Click runs. The subform displays only those
records matching the master/child properties values, not the value the user
selects in the subform.
Anyone has any ideas how to troubleshoot?