Error: Object does support

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

When this code is run in an after update event:

Forms![frmLookup]![frmXrf2cf].Filter = Me.Combo2

I get an error that says Object doesn't support this property or method.

What do I nned to change?

Thanks.
 
SAC said:
When this code is run in an after update event:

Forms![frmLookup]![frmXrf2cf].Filter = Me.Combo2

I get an error that says Object doesn't support this property or
method.

What do I nned to change?

I'm guessing that frmXrf2cf is a subform. In that case, the subform
control itself doesn't have a Filter property; you have to get down to
the Form object that the subform control contains. So use this:

Forms![frmLookup]![frmXrf2cf].Form.Filter = Me.Combo2

I trust that Combo2 contains a valid filter string.
 
You are right! It's a subform. THANKS!

Dirk Goldgar said:
SAC said:
When this code is run in an after update event:

Forms![frmLookup]![frmXrf2cf].Filter = Me.Combo2

I get an error that says Object doesn't support this property or
method.

What do I nned to change?

I'm guessing that frmXrf2cf is a subform. In that case, the subform
control itself doesn't have a Filter property; you have to get down to
the Form object that the subform control contains. So use this:

Forms![frmLookup]![frmXrf2cf].Form.Filter = Me.Combo2

I trust that Combo2 contains a valid filter string.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Back
Top