IT tutorials
 
Office
 

Microsoft Access 2010 : Create Custom Forms (part 2) - Adding Controls

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
2/28/2015 8:23:57 PM

Adding Controls

Although controls of zone of text and label are the most common controls found in the forms, you can also increase your forms with many of other types of controls. For example, you can add groups of buttons of option, check boxs, and zones of list to the current people with choices instead of making them type entries in zones of text.

When a form is shown in the sight of provision or the sight of design, controls available are located in the gallery of controls on the contextual design table. There are three categories of controls:
  • Bound. A control that is linked to a field in a table or the datasheet created by a query. These controls include:

    • Text boxes and labels

    • Option groups, combo boxes, and list boxes

    • Charts

    • Subforms/Subreports

  • Unbound. A control that is not bound to any underlying data. These controls include:

    • Buttons and toggle buttons

    • Tabs and page breaks

    • Hyperlinks and Web Browser controls

    • Lines

    • Images

  • Calculated . A control that displays the results of an expression.

Tip

If you create a form for a table with many fields, or if you add many controls to a form, you can organize the controls on pages by using the Page Break control, or on tabbed pages by using the Tab control.

In this exercise, you will insert an image in the heading of form of a form and will replace the title of defect by fact on order. You will also replace a control of zone of text in the section of detail by a control of combined box.


  1. In the Customers form, point to the bottom of the Form Header section, and when the pointer changes to a double-headed arrow, drag downward to increase the header size to about 1.5 inches.

  2. In the Form Header section, select the logo control, hold down the Shift key, and select the label control. Then press the Delete key.

  3. On the Design contextual tab, in the Controls group, click the Insert Image button, and then click Browse.

    image with no caption

    Tip

    If the Hydrangeas image already appears in the Image gallery displayed when you click the Insert Image button, you can simply click the image instead of browsing to it.

  4. In the Insert Picture dialog box. Then change the type of file from Web-Ready Image Files to All Files, and double-click Hydrangeas.

  5. Point to the upper-left corner of the Form Header section, and drag diagonally to draw a box about 1 inch high and 1.5 inches wide.

    The picture is inserted into the image control.

    Tip

    The Hydrangeas photograph has been inserted into the Form Header section.

    Tip

    How adjustments of an image in a control of image is determined by the property of mode of size of control. If the property is placed to cross and controls it is not enough large to show the whole image, the image is cultivated. If the property is placed at the right end, you can increase control to show the whole image. If the property is placed to hum (the defect), the image gives to the coast automatically to adapt control.

  6. In the Controls group, display the Controls gallery.

    Depending on the size of your program window and your screen resolution, you might need to click the More button or the Controls button to display this gallery.

    Tip

    You can insert any control from this gallery.

  7. In the gallery, click the Label button, and then to the right of the picture in the Form Header section, drag diagonally to draw a box about 2 inches wide and 0.5 inch tall.

    image with no caption

    Access inserts a label control containing the cursor, ready for you to enter a title for the form.

  8. In the active label control, type Garden Company. Then press Shift+Enter to insert a line break, and type Customers.

  9. Click the Form Header section bar. On the Format contextual tab, in the Control Formatting group, click the Shape Fill button. Then under Theme Colors in the palette, click the third box (Light Green, Background 2).

    image with no caption
  10. Select the label text, and in the Font group, make the text 20 points, bold, and dark green. Then center the text.

  11. If Garden Company wraps to two lines, drag the sizing handle in the middle of the right side of the label frame to the right until the text fits on one line. Then on the Arrange tab, in the Sizing & Ordering group, click the Size/Space button, and under Size in the Size/Space gallery, click To Fit.

    image with no caption

    The label control now fits its text.

  12. Reduce the height of the Form Header section so that it is just big enough to contain its controls.

    The form now has a more prominent title.

    Tip

    The completed Form Header section.

  13. On the Design tab, display the Controls gallery, and verify that the Use Control Wizards button is not orange. If the button is orange (active), click it to deactivate it.

    image with no caption

    When the Control Wizards feature is turned off, you can add a control with all its default settings, without having to work through the associated wizard’s pages.

  14. Enlarge the Detail section to create at least an inch of space below the Country controls.

    We want to create a combo box that displays a list of possible countries but that also allows users to type the country if it is not already in the list.

  15. In the Controls gallery, click the Combo Box button. Then drag diagonally to draw a box below the Country text box control. Make it about 1.5 inches wide and about 0.25 inch tall.

    image with no caption

    When you release the mouse button, Access displays a combo box control and an associated label control.

    Tip

    Because this control is not attached to a field in the Customers table, it is labeled Unbound.

    Tip

    Access assigns a number to each control when it is created. Don’t be concerned if the numbers associated with the controls you create are different from those in our graphics.

  16. Click the Country text box control. On the Format contextual tab, in the Font group, click the Format Painter button, and then click the combo box control.

    image with no caption

    Access copies the formatting of the Country text box to the combo box control and its label.

  17. Right-click the combo box, and then click Properties to open the Property Sheet.

    Now let’s create a simple query that extracts one example of every country in the Country field of the Customers table and displays the results as a list when users click the combo box arrow.

  18. Click the Data tab of the Property Sheet. Then click the Control Source arrow, and in the list, click Country.

    In the combo box control on the form, Unbound has been replaced by Country.

  19. Verify that the Row Source Type property is set to Table/Query. Then in the Row Source box, type the following:

    SELECT DISTINCT Customers.Country FROM Customers;

    There is a period (but no space) between Customers and Country, and a semicolon at the end of the text.

    Tip

    To display the entire query, you can widen the Property Sheet by dragging its left border to the left.

  20. Click the combo box label control. Click the Format tab of the Property Sheet, and change the Caption property to Country.

  21. Click the original Country text box control, and press Delete to delete the control and its associated label. Then move the new combo box and label into their places, resizing them as needed.

    Tip

    To make sure that new controls are aligned with existing controls, you can click on an existing control and note its width, cuts, above, and left properties. Employ then which of these arrangements are adapted to regulate with precision new control.

  22. Shrink the size of the Detail section until it is only as wide and as tall as it needs to be to hold its controls.

  23. On the Design tab, in the Controls gallery, click the Line control, and drag a line across the width of the form to separate the name and phone number information from the address.

    image with no caption
  24. In the Property Sheet, set the Height property to 0 and the Border Width property to 2 pt. Then close the Property Sheet.

    Tip

    Setting the height to 0 does not make the line invisible; it ensures that the line is straight.

  25. With the line still selected, on the Format tab, in the Control Formatting group, click the Shape Outline button, and set the line color to dark green.

    image with no caption

    Now let’s make sure that no matter what size the program window is, the line always stretches across the width of the form.

  26. On the Arrange tab, in the Position group, click the Anchoring button.

    image with no caption

    The Anchoring gallery appears.

    Tip

    You can anchor a control in four positions and make it stretch in five directions.

  27. In the gallery, click the Stretch Across Top thumbnail.

  28. Switch to Form view, and try making the program window various sizes.

    Even though the width of the form was only about 5 inches in Design view, the form header and the line always span the width of the window.

  29. Scroll through a couple of records, and then click the Country combo box arrow.

    Access displays the country list.

    Tip

    Selecting possible entries is quick and easy with a combo box.


 
Others
 
- Microsoft Access 2010 : Create Custom Forms (part 1) - Modifying Forms Created by Using a Wizard
- Microsoft Word 2010 : Creating Mail Merge Documents - Creating a Data Document
- Microsoft Word 2010 : Creating Mail Merge Documents - Importing Data from Outlook
- Microsoft Word 2010 : Creating Mail Merge Documents - Importing Data from a Database
- Microsoft Word 2010 : Starting the Mail Merge
- Microsoft Visio 2013 : Adding Sophistication to Your Drawings - Understanding and using layers
- Microsoft Visio 2013 : Adding Sophistication to Your Drawings - Inserting pictures
- Microsoft Excel 2010 : Filtering Options (part 3) - Using the Search Function for Grouped Dates, Using Text, Number and Date Special Filters
- Microsoft Excel 2010 : Filtering Options (part 2) - Searching Functions for Listed Items
- Microsoft Excel 2010 : Filtering Options (part 1) - Filter Listing for Listed Items, Grouped Dates Filter Listing
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS