Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo filter 1

Status
Not open for further replies.

milte

Technical User
Jan 30, 2002
20
US
Hello all,

I have a form with an unbound combo box. I'd like the form to filter on the selection I made from the combo box. What is the best way to do this?

Thanks for your help,

Milt
 
Try this in the AfterUpdate event procedure of the ComboBox:

Me.Filter = "[FieldName] = '" & me![ComboValue] & "'"
Me.FilterOn = true
Me.requery

The expression used above depicts a text value for the FieldName(note single quotes around combo value)

If Numeric field name value then use the following:
Me.Filter = "[FieldName = Me![ComboValue]"

This should get you close to what you want. Get back to me if you need more assistance. Bob Scriver
 
Thanks, Bob.

I can't tell you how much I appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top