
Filtering an access database with buttons
If there are not too many options, you can just use buttons. However, I
suggest it's better to use a combo box to save space on the dialog. Either
way, you can filter the recordset use the "Filter" property. The following
sample code assumes a combo box is used:
rs.Filter = "name = '" & DataCombo1.Text & "'"
Note: the apostrophe ' is necessary here.
I'm a Microsoft Employee, and I've been "encouraged" to include the
following information from our lawyers: this posting is provided "As Is"
with no warranties, and confers no rights. That means there is no warranty
of merchantability or fitness for a particular purpose, and no warranty of
non-infringement. See full details on terms of use.