881
CHAPTER
Advanced Data
Access with VBA
IN THIS CHAPTER
Using a combo box to find a
record on a form
Using the form’s filter options
I
n the previous few chapters, you learned the basics of Access program-
ming, reviewed some built-in VBA functions, and experienced the vari-
ous VBA logical constructs. You learned about DAO and ADO and how
to access data in tables and queries through SQL recordsets. You also learned
a lot about forms and queries.
In this chapter, you use all this knowledge and learn how to display selected
data in forms or reports using a combination of techniques involving forms,
Visual Basic code, and queries.
On the CD-ROM
In the Chapter25.accdb database, you’ll find several forms to use as a
starting point, and other completed forms to compare to the forms you change
in this example. All the examples use a modified version of frmProducts and
tblProducts.
Adding an Unbound Combo Box
to a Form to Find Data
When viewing an Access form, you often have to page through hundreds or
even thousands of records to find the record or set of records you want to
work with. You can teach your users how to use the Access “find” features,
what to do to see other records, and so on, but this defeats the purpose of a
programmed application. If you build an application, you want to make it
easier for your users to be productive with your system, not teach them how
to use the tools built into Microsoft Access.