O'Reilly logo

Access™ 2007 Bible by Gavin Powell, Joseph C. Stockman, Jennifer Reardon, Michael R. Groh, Michael R. Irwin, Cary N. Prague

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 27. Advanced Data Access with VBA

IN THIS CHAPTER

  • Creating code that finds a record by using a form control

  • Creating code that uses a bookmark to find a record

  • Using the form's filter options

  • Using a form to filter records

  • Creating a parameter query

  • Interfacing a parameter query to a form dialog

In the previous few chapters, you learned the basics of programming, reviewed some built-in VBA functions, and experienced the various VBA logical constructs. You learned about ADO and how to access data in tables and queries through SQL recordsets. You also learned a lot about forms and queries in previous chapters. 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.

Note

In the Chapter27.accdb database, you will find several forms to use as a starting point and other completed forms to compare to the forms you change in this example. All of the examples use a modified version of the frmProducts form and tblProducts.

Adding an Unbound Combo Box

When viewing a 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 user how to use the Access "find" features and wildcards, 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 become productive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required