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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter for Search ComboBox ? 1

Status
Not open for further replies.

maverick

MIS
Apr 21, 1999
193
0
0
US
How do you get the search combobox to filter when you filter the records ?

Say you filter all records to only the records from CA...

the search combobox still shows all records...
How can you update the search combobox to only show the CA records if that's what the filter is ?

Thanks! "Hacker by Heart"
saenzinc@hotmail.com
 
Set up a query with criterion based on current filter, then set the Row Source Type to Table/Query and the Row Source to the name of the query. Alex Middleton
 
Can you give me an example of Current Filter, I think I understand the rest..

Thanks "Hacker by Heart"
saenzinc@hotmail.com
 
In query design add the table or tables you want your data to come from. Under the field for 'State', or whatever the field with 'CA' in is called, add into the 'Criteria' line

='CA'

or

Like 'CA'

Save the query, eg qryCA, then put this as the query that is the Row Source of the combo (it should appear in the drop-down list if you click the arrow in the Row Source line in the combo's property sheet).

Hope this helps.


Alex Middleton
 
On got focus set up a msgbox to get MyPickState.

You can control the source of the combo box by going to the recordsource property.

Me.Combo22.RowSource ="SELECT * FROM [MyTable] WHERE (((MyTable.State) = " & Chr(34) & MyPickState& Chr(34) & "))"

To object or not to object
That is the question
Alast poor varible I new you well
 
ComputorMike,

Is "MyPickState" a function you wrote ?

I can't find it anywhere !

Mav "Hacker by Heart"
saenzinc@email.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top