filter not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am applying a filter to a subform (object name = subfrmKitComps) based on a
field in the current record of another subform:

Me.Parent.subfrmKitComps.Form.Filter = "KitItem = '" & StrCurrentKit & "'"

where StrCurrentKit was obtained from the Current event of the other subform.

Unfortunately, subfrmKitComps still shows all records; it does not exclude
those records with values in the KitItem field not equal to StrCurrentKit.

What am I doing wrong?

Thanks!
 
Allen,

I beleive the issue is with the fact that you do not apply the filter. Your
code defines a filter but you are not actually applying it.

Something like

Me.Filter = "Country = 'USA'" 'Define filter
Me.FilterOn = True 'Apply the filter (or remove it if
= False)

Look up filter in the help to get examples.

Hope this help,

Daniel
 
Back
Top