Summary


This chapter covers three main topics and provides bonus content outside the textbook through a module (AssistantModule) in the Chapter08.mdb file and an excerpt from a prior version of this book ( www.programmingmsaccess.com /ForA2002/AssistantObject.htm ). The three main topics covered in the chapter are an overview and comparison of DocumentProperty , CurrentDB , and CurrentProject objects, an examination of the FileSearch object, and a careful review of the CommandBar object model. All three of these topics are rich in code samples for performing typical chores that you are likely to require in the applications that you build.

The highlight of the first section are two samples that show how to present a custom form instead of the Database window. These two samples are special because they essentially lock out the ability of the user to override the custom start with any special keys. In addition, the process is different in important ways for .mdb files versus .adp files. Therefore, the chapter presents a separate sample for each type of file. The CommandBar object model discussion revisits the topic to show how to make unavailable menu options that would allow users to bypass the custom form to get to the Database window.

The FileSearch object is a programmatic interface to the File Search capability in Office. You can manually access this capability from the Database toolbar in Access; its default control position is the fourth control from the left. The programming samples in this section illustrate the basics along with a couple of tips for optimizing programmatic searches. In addition, one sample demonstrates how to design a custom form that enables custom file searches. This design approach permits your applications to offer an alternative to the built-in File Search interface. The section closes with several samples that go beyond the FileSearch object. One sample illustrates how to apply FileSystemObject to develop a utility application for copying any file from one location to another on a LAN. The last two applications in the section demonstrate how to modify the Task Pane with links for creating files and opening files.

The closing section drills down on the CommandBars object model. The section commences by introducing the basics of object enumeration for command bars, menus , and menu items. Next, it presents how to modify the built-in commands by adding and making unavailable CommandBar and CommandBarControl objects. The chapter closes with a series of samples that demonstrates different approaches to building custom CommandBar objects and populating them with CommandBarControl objects.




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