Auto Filter like Excel?

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi All,
I have a database with 5 five combo boxes that I want to be able to
filter like Excel, selecting one value from combo box 1, would automatically
update the form. The vaules from these comboxes is pulled from the query
which my form is based on. Thanks.
Paul.
 
Add the 5 combos to your queries criteria by right-clicking and choosing
Build. Each combos criteia should look something like:

Like [Forms]![FormName]![cboComboName] & "*"

In the AfterUpdate event of each combo, line of code in an event procedure:

Sub cboComboName_AfterUpdate()
Me.Requery
End Sub

which will requery the form with the new values.
 
Thanks Arvin. Everything works smoothly.
Arvin Meyer said:
Add the 5 combos to your queries criteria by right-clicking and choosing
Build. Each combos criteia should look something like:

Like [Forms]![FormName]![cboComboName] & "*"

In the AfterUpdate event of each combo, line of code in an event
procedure:

Sub cboComboName_AfterUpdate()
Me.Requery
End Sub

which will requery the form with the new values.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Paul said:
Hi All,
I have a database with 5 five combo boxes that I want to be able to
filter like Excel, selecting one value from combo box 1, would
automatically update the form. The vaules from these comboxes is pulled
from the query which my form is based on. Thanks.
Paul.
 
Back
Top