Less Frequently Used Controls

3 4

Although the controls described in the previous sections will be the ones you use most often on forms, other controls are available that can be useful for special circumstances, such as when you want to display an image or an Excel worksheet on a form or when you need to create a multipage form. These special controls are described in the following sections.

Images

You can use the image control to display an image on a form. Since this control can't be bound, the image will be the same on every record displayed on a form. You might use this control to place decorative art or a company logo on a form.

Unbound Object Frames

An unbound object frame can display a variety of objects, such as Excel worksheets, Microsoft Word documents, and images. Don't use the unbound object frame to place an image on a form-the image control is better for that. However, if you need to display another type of object on all records of a form, use the unbound object frame.

Bound Object Frames

A bound object frame displays an object (such as a Word document or an image) stored in an OLE Object field in a form's record source. This control displays different content on different records. The Northwind Categories form uses a bound object frame control to display images of the food categories, as shown in Figure 6-29.

figure 6-29. a bound object frame control displays an image on the northwind categories form.

Figure 6-29. A bound object frame control displays an image on the Northwind Categories form.

InsideOut

Storing OLE data in fields in a table can use an enormous amount of space in your database. To save space, consider alternative techniques, such as using hyperlink fields to open Word documents or Excel worksheets or assigning an image field to the Picture property of an image control. Refer to the Employees form in the sample Northwind database for an example of this technique. In the Employees form, only the path to the image is stored in the database; the image file itself is retrieved in the form's Current event. The files are stored in the \Program Files\Microsoft Office\Office10\Samples folder by default, which means that the code won't work if the images are moved-this potential pitfall should be a consideration when using this technique.

Toggle Buttons

The toggle button control (like a check box or an option button) represents a Yes/No or True/False value. In contrast with those other controls, however, what the different statesof the toggle button represent is by no means obvious to users. In addition, the toggle button is likely to be confused with a command button because of its similar appearance.

Although you can painstakingly explain to users that a depressed toggle button control means No and a raised toggle button control means Yes, using a check box control to represent a Yes/No value is much more intuitive-everybody knows what that means.

Page Breaks

The page break control indicates where a new form page begins. In Access 1.0 and 1.1 (before the introduction of an early version of the tab control in Access 2.0), multipage forms were the only way to manage a lot of controls on a form. However, the tab control offers a more elegant (and efficient) way to handle groups of controls, so you should use it instead of the page break control.

See the section "Tabs," for a discussion of using tab controls to display large amounts of data on a form.



Microsoft Access Version 2002 Inside Out
Microsoft Access Version 2002 Inside Out (Inside Out (Microsoft))
ISBN: 0735612838
EAN: 2147483647
Year: 2005
Pages: 172
Authors: Helen Feddema

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