Summary


This chapter is about creating custom solutions with forms. The emphasis is on programming, as opposed to how to use the many excellent built-in wizards and graphical design features for forms in Access. For example, this chapter repeatedly shows you how to set form and control property values programmatically at run time, although you can also set these properties manually at design time. Managing properties at run time is inherently more flexible because your applications can adapt to users and environmental conditions at startup and over the course of an application. Reviewing a VBA script that changes the default settings is a faster way to detect design changes than hunting through property sheet tabs.

Another major focus in this chapter is how to programmatically populate the RecordSource and Recordset properties of forms. This emphasis equips you with the skills needed to re-use your forms with different data sources. Two samples in the chapter illustrate how to work with parameter queries and ADO objects to support user interactivity via Access forms. Other samples demonstrate how to use familiar Access database objects and Jet SQL string expressions for the same objective. By using the principles and adapting the samples covered in this chapter, you can reduce the number of forms necessary for applications and create solutions that are more efficient to maintain.

The chapter's final major focus is the programmatic manipulation of form objects in an application. The chapter's concluding sections explain how to enumerate and manipulate the forms in an application whether or not they are open . You learn how to perform these tasks for other Access databases besides the current one. You also find out about the impact of changes to property settings in Form versus Design view. The chapter's concluding samples highlight techniques for instantiating and tracking multiple instances of the same form in an application.




Programming Microsoft Office Access 2003
Programming MicrosoftВ® Office Access 2003 (Core Reference) (Pro-Developer)
ISBN: 0735619425
EAN: 2147483647
Year: 2006
Pages: 144
Authors: Rick Dobson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net