Home

Sectional and Tabbed Forms

Sectional Forms

Introduction to Form Breaks

Databases are made of various objects and it is not unusual for one of these objects to contain various fields. If you try to create a form for such an object, you may encounter a space problem. Even if you decide to reduce the amount of information on a table, because you still need to follow your customer’s goal, you may not have this complete liberty. Therefore, instead of deleting necessary fields, you can use one of the various alternatives offered by Microsoft Access.

When logistic becomes a problem for the amount of information you need to include in a form, you can divide the form into sections and allow the user to access only one section at a time, although still remaining in the same form. This is made possible by a special control called the Page Break.

Creating a Page Break

To create sections on a form, on the Toolbox, click the Page Break control and click the left side inside the Detail section of a form.

You can add as many sections as you want. To make the roles of your form sections efficient, they should have the same height. Otherwise, when you decide to display them, part of one section might appear in another section, which would deceive the purpose of creating sections.

To create the sections on a form, isolate different groups of controls. The groups should have the same height. After creating the sections in the Design View, in the Controls section of the Ribbon, you can click the Insert or Remove Page Break button and, on the form, position the mouse in the area where you want to create a page break and click. If you are planning to create more than one section, add a Page Break in the desired sections. After creating the page break(s), there are a few things you should(must) do. First, you should reduce the height of the form to the regular size you would like it to display to the user. Second, you can create a macro (or write (just a tiny piece of) code) to make the form function the way it should. You should first create a button that would be used to access a section. To create a macro for this functionality, on the Ribbon, click Create and, in the Other section, click Macro (the top portion of the button) . In the Action combo box, select GoToPage (you can also use GoToControl). In the Page Number box, enter 1 for the top section, 2 for the second section, and so on:

Then save the macro. After creating the macro, you must assign it to a control, such as a command button, that would run it. To do this, access the Properties window for the control and access the Event or the All tab. For a command button, you can type the name of the macro in the On Click field:

Instead of first creating a macro before assigning it to command button, as another technique, in the Design View of the form, you can right-click the command button and click Build Events. In the Choose Builder dialog box, you can click Macro Builder and click OK. The new macro would be automatically assigned to the control. In the Action combo box, select GoToPage. In the Page Number box, enter the desired number of the section, and close the macro. You would be asked to save it. You can use any of these techniques to create macros to access the other sections if necessary. Once the functionality has been implemented, the sections can be accessed when the user clicks a button.

Practical Learning: Using a Page Break

  1. Start Microsoft Access and, from the resources that accompany our lessons, open the Bethesda Car Rental1 database
  2. In the Navigation Pane, under Customers: Table, double-click Customers1 to open it:
     
    Customers
  3. After viewing it, close it
  4. Again, in the Navigation Pane, right-click Customers1 and click Design View
  5. In the Controls section of the Ribbon, click the Insert or Remove Page Break button and, on the form, position the mouse in the Details section at 21/4 of the vertical ruler
     
    Page Break
  6. Then click
  7. Once again, in the Controls section of the Ribbon, click the Insert or Remove Page Break button and, on the form, click in the Details section at 4.5 of the vertical ruler
     
    Page Break
  8. While still in the Design View, reduce the height of the form so that the Work Phone label appears in half
     
    Page Break
  9. In the Controls section of the Ribbon, make sure the Use Control Wizard button is not clicked Use Control Wizard.
    Click the Command Button and click the Form Footer section of the form
  10. Add two more buttons and change their properties as follows:
     
    Page Break
    Button Name Caption
    cmdContact Contact
    cmdPersonal Personal Information
    cmdComments Comments
  11. To create a macro, right-click the Contact button and click Build Events...
  12. In the Choose Builder dialog box, double-click Macro Builder
     
    Macro Builder
  13. In the Action combo box, select GoToPage
  14. In the bottom section of the window, click Page Number and type 1
  15. Close the macro window
  16. When asked whether you want to save, click Yes
  17. On the form, right- click the Personal Information button and click Build Events...
  18. In the Choose Builder dialog box, click Macro Builder and click OK
  19. In the Action combo box, select GoToPage
  20. In the lower section of the window, click Page Number and type 2 and close the macro window
  21. When asked whether you want to save, click Yes
  22. On the form, right- click the Comments button and click Build Events...
  23. In the Choose Builder dialog box, double- click Macro Builder
  24. In the Action combo box, select GoToPage
  25. In the lower section of the window, click Page Number and type 3 and close the macro window
  26. When asked whether you want to save, click Yes
  27. Save the form and switch it to Form View
  28. Click the buttons to test the functionality
     
  29. Close the form

Tabbed Forms

 

Introduction

Besides the page breaks you can use to divide a form, if you are designing a form for a long list of fields, you can group them in tabs. A tab control is an object that is used to hold other Windows controls. This control presents a tab button on its top section. This tab button should present a label that indicates what the tab is used for. Sometimes, a tab is also called a property page.

The primary job of a tab control is to “hold”, “host”, or “carry” other controls. It can appear by itself. Here is an example:

Tab Control

In most cases, a tab control comes in a group with one or more others. In this case, each tab hosts or carries its own controls. Tabs are positioned one in front of the other(s).

To use a tab control, the user clicks a tab. The tab that was clicked comes in front and displays its child controls. The other tab(s) goes(go) to the back and hides(hide) its(their) child control(s). If there is more than one tab, all tabs display a labeled button on top. To change the list, the user simply clicks another tab and the scenario renews. Here is an example:

Tab Control Tab Control

Adding a Tab Control

To create a tabbed form, while the form is in Design View, in the Controls section of the Ribbon, you would click the Tab Control Tab Control and click the form. By default, after adding a new tab control to a form, it is equipped with two tab pages. Before manipulating a tab control, there are details you should keep in mind. In the programming world, we consider that a tab control is actually made of two objects presented as one. A tab sheet, also called a property sheet, is like the desk of a table. If you listened to your teacher in primary or elementary school, you probably heard her saying over and over that you should/must not write on the desk of a table. This is also true here. In real life, everything on a table is positioned on that table, like pieces of paper. On a tab sheet, the tab page are positioned on the tab sheet (in Microsoft Access, you cannot access the tab sheet, meaning you cannot place anything on it; in some programming environments, you can certainly access the property sheet). This discussion is intended to show you that there is a separation between the tab control and the area on which it lies. This makes it possible to move all tab controls with one movement.

The tab sheet is a rectangle that surrounds the tab controls and holds them as their parent. To tab sheet is represented by the area on the right side of the tabs. To select that tab sheet, you can click that area:

When the tab sheet is selected, you can see that its Name in the Properties window starts with TabCtlX. If you select the tab sheet and move it, the tab pages on it would move also. If you delete the tab sheet, its tab pages would be deleted also. For this reason, the tab sheet is considered their parent.

As mentioned already, the tab pages you use are actually positioned on a tab sheet. Each tab page is considered on its own and its only relationship with the other tabs is that they belong to the same sheet. Based on this, each tab can be accessed separately. To manipulate the properties of a tab page, you should select it first. To do that, click its label (not necessarily its body).

By default, after adding a new tab control to a form, it is equipped with two tab pages. To add a new tab, you can right-click one of the tabs or the area of the tab sheet and click Insert Page:

To remove a tab page, you can click its tab and press Delete. Alternatively, you can right-click a tab and click Delete Page.

We stated that a tab control (property page) acts as a parent for other controls positioned on it. Based on its role, it should indicate its role. This is specified by its button, which displays a caption. Therefore, after adding a tab control, one of the first actions you probably should take is to specify its role. This is role by changing the value of its Caption in the Properties window.

After you have typed a string for the Caption of a tab, its width is adjusted to accommodate its string. This is done for each tab. Consequently, one tab with a Resume caption and another tab with Personal Information as caption, would have different widths. Alternatively, you can give the same width to all tabs regardless of their different lengths of strings. In this case, a tab with Resume and another with Personal Information labels would have the same width. To give the same width to the tabs, in the Format tab of the Properties window of the tab control (the tab sheet itself), change the value of the Tab Fixed Width property. The default value of 0” means that you let Microsoft Access determine the necessary width to contain the label on the tab. You can then change the value as you wish. Here is an example where all tabs share the same width after the tab control's Tab Fixed Width property has been set (to 1.0458"):

In the same way, the Tab Fixed Height property can be used to control the height of the tabs or buttons.

You can display either or both a picture and a label on the tab. Although the picture can be any size, you should limit it to 16x16 pixels. Here are examples:

To add a picture to the button, select the tab. In the Properties window, click the Picture property and click its ellipsis button. Locate and select a picture. It should be a bitmap (with bmp extension) or an icon (with ico extension).

By default, tab pages display their labels on a tab. If you do not like the tab, you can use either a button or nothing. This characteristic is controlled by the Style property in the Properties window of the tab sheet. This property has three values: Tabs, which is the default, Buttons, and None:

Like the Tabs value, the Buttons property allows each tab page to display a label that indicates its role. You can display a button with or without a picture:

If you set the Style property to None, the tab sheet would appear as a simple rectangular box and the user would not be able to change the pages. Therefore, if you decide to use this option, unless you want to hide the other pages, make sure you provide the user with the means of switching to a difference property page.

Based on the role of the tab sheet, some properties of the tab sheet are also imposed on the tab pages. For example, in the Properties window, if you change the value of the Top or the Left properties, the tab sheet moves and at the same time, the corresponding values of the tab pages are changed.

Practical Learning: Creating a Tabbed Form

  1. The Bethesda Car Rental1 database should still be opened.
    In the Navigation Pane, under Customers: Table, double-click Customers2 to open it, then switch it to Design View
  2. In the Controls section of the Ribbon, click the Tab Control Tab Control and position the mouse in the top-left side of the Detail section of the form
     
    Adding a Tab Control
  3. Then click
  4. To add a new tab, right-click the tab control and click Insert Page
  5. Double-click the middle of the first tab page to access its Properties window
  6. Change the Caption property to Contact
  7. Click the middle tab page and, in the Properties window, change its Caption to Driving Information
  8. Click the right tab page and, in the Properties window, change its Caption to Notes/Comments
  9. Using the Existing Fields window, complete the design of the form by adding the controls
  10. Save the form and close it

Subforms and Subreports

 

Introduction

A relational database allows you to separate data in objects so that these objects can hold different pieces of information and make data available to other objects that need it. Sooner or later, users constantly need information held by one form or report while they are working on another form or report. There are various ways you can solve such a problem. One solution is to "embed" one form or report into another form or report.

A subform (or a subreport) is a form (or a report) that you position inside of another form (or another report). In order to "include" one form (or report) into another form (or report), both objects must have a relationship, as we have learned in the past. The form (or report) that is hosting the other form (or the other report) is the parent. The form (or report) that is added to the parent is called the child form (or child report). The parent object must have a primary key that "links" or relates it to a foreign key in the child object.

Microsoft Access Automatic Subforms

Microsoft Access provides various techniques you can use to create a subform. Probably the simplest technique consists of using a wizard. This allows you to specify the table or query that is holding the parent records, followed by the table or query that has the child records. Of course, both lists must be able to communicate through the primary key of the parent list and a foreign key in the child list.

To generate a form that contains a subform, start the Form Wizard. In the first page of the wizard, in the Tables/Queries combo box, select the parent object and, in the Available Fields list, select the fields you want to display on the form. Then, in the Tables/Queries combo box again, select the child list. In the Available Fields list, select the fields that the subform should display. Continue with the wizard. In the second page, you must be able to identify the relationship that will control the link between both list. In other words, you must be able to identify the primary key from the parent list and the foreign key from the child list. Once this is clear, you can continue. In the third page of the wizard, you will decide how you want the subform to display, as a tabular list or as a datasheet. After making this decision, you can continue. The fourth page of the wizard allows you to select a preset design you want to apply to the form (and the subform). There is no particular design you need to follow for a subform. After making the selection, you can click Next and Finish. 

Practical Learning: Automatically Creating an Auto-Subform

  1. Open the Video Collection3 database you created in the previous lesson. If you did not create it, from the resources that accompany these lessons, open the Video Collection3a database
  2. On the Ribbon, click Create
  3. In the Forms section, click More Forms -> Form Wizard.
    If you receive a Microsoft Office Access Security Notice, read it and click Open
  4. In the Tables/Queries combo box, select Table: Directors
  5. Click the Select All button
  6. In the Tables/Queries combo box, select Table: Videos
  7. Double-click the following fields to select them: Title, CopyrightYear, Length, and Rating
     
    Form Wizard
  8. Click Next
  9. In the second page, click by Directors (or make sure it is selected) and click Next
     
    Form Wizard
  10. In the 3rd page, click the Tabular radio button
     
  11. Click Next
  12. In the 4th page, click the Module style and click Next
  13. In the 5th page of the wizard, accept the name of (main) form as Directors.
    Change the name of the subform to sbfVideos
     
    Form Wizard
  14. Click Finish
  15. After viewing the form, close it

Subforms and Subreport Design

 

Introduction

The Form Wizard allows you to quickly create a subform. This would be fine if you just want to review records associates from one table to another. As effective as it can be, it can also provide some functionality you do not need and do not want. Besides that, the Form Wizard imposes some aspects you must simply accept. The alternative it to design your own subform, and you have various options:

All these techniques indicate that you should be able to configure the functionality of the subform as it relates to the form that will host it. When designing a subform, you must also specify its appearance. You have the options as datasheet, tabular, or just regular form.

The Datasheet Subform

As mentioned in Lesson 8, a form can appear as a datasheet like a table. This makes the form appear with columns and records whose intersections are cells. You can also create a subform that display as a datasheet.

To create a subform that would display as a datasheet, start the form in Design View. In the Properties window, set its Default View to Datasheet. When designing the form, you can position the controls anywhere because their positions would not be obvious on the form. Also, the sizes of the labels and fields would not show on the form. When designing the form, you work in Design View. The Datasheet View appears only if you change the view. Although you can use the different sections of a form, for a Datasheet form, the sections would appear only in the Design View, not in Datasheet View.

When adding controls or other objects to a subform (or a form) that would display in Datasheet View. Only the controls you display in the Detail section would appear when the subform comes up. The objects in the other sections would not appear. You can use this feature to your advantage. For example you can add unbound controls in a Form Footer section to hold some values or perform some calculations, then refer to those controls in the parent form.

Practical Learning: Using a Datasheet Subform

  1. Open the Music Collection3 database
  2. To create a new form, on the Ribbon, click Create and, in the Forms section, click Form Design
  3. Access the Properties window for the form and set its Record Source to AlbumTracks
  4. Save the form as sbfTracks
  5. Reduce the width of the form so its right border is at 23/8
  6. If the Field List is not displaying, on the Ribbon, click Design and, in the Tools section, click Field List Field List.
    In the Field List, click TrackNumber. Press and hold Shift. Then click TrackLength and release Shift. This selects the TrackNumber, the TrackTitle, and the TrackLength fields
  7. Click and drag the selected fields to the Detail section of the form. There is no need to change the positions or locations of the labels and text boxes
  8. lick each label twice (not double-click; simply click it once and click it again) to put it into edit mode and then delete the colon “:” on the right side of each string
  9. Click the TrackNumber text box and, on the Ribbon, click the Right button Right:
     
    Subform
  10. Double-click the button at the intersection of both rulers. In the Properties window, click Format and change the following properties:
    DefaultView: Datasheet
    Record Selectors: No
    Navigation Buttons: No
    Dividing Lines: No
  11. To switch the form to Datasheet View, on the Ribbon, click the arrow of the View button and click Datasheet View Datasheet
  12. Right-click the # column header and click Column Width... Type 3.85 and press Enter
  13. Right-click the Track Title column header and click Column Width… Type 24.75 and press Enter
  14. Right-click the Length column header and click Column Width… Type 7.85 and press Enter
     
    Subform
  15. Save and close the subform
  16. In the Navigation Pane, double-click MusicAlbums: Table form to open it
  17. After viewing it, switch it to Design View and click the Tracks tab on the tab control
  18. In the Controls section of the Ribbon, click the Use Control Wizard button
  19. To add the new subform, in the Controls section of the Ribbon, click the Subform/Subreport button Subform/Subreport
  20. Click the body of the Tracks tab on the form
     
    Music Collection
     
    If you receive a Microsoft Office Access Security Notice, read it and click Open
  21. In the first page of the Subform/Subreport Wizard, in the list of forms, click sbfTracks and click Next
  22. In the second page of the wizard, make sure the Choose From A List radio button is selected. Also, in the Select One Of These Links list box, make sure the relationship is based on the AlbumID field.
    Click Next
  23. Accept the suggested name of the subform as sbfTracks and click Finish
  24. Click the label that was added to the subform and press Delete (to remove the label). You may also need to move the subform and resize the tab sheet
  25. Save and preview the form
     
    Music Collection
  26. Close the form

The Continuous Form

A variant of the datasheet is the tabular form. As mentioned in Lesson 8, a tabular form displays its records in groups. Instead of showing one record at a time, the form can show as many records as its size allows:

Continuous Form

This type of form is referred to as continuous because the records are displayed continuously in the same view. If the number of records is not too high, all of them would display. If there are more records than the form's size can allow to view, some records would be hidden. To view them, you can use the scroll bars.

To create a continuous form, you can use the Form Wizard where, in the second page of the wizard, you would select the Tabular option. To create a continuous form in Design View, set its Default View to Continuous Forms.

Unlike the datasheet form, a continuous form can be equipped with, and can display, other sections than the Detail in Form View. This means that you can include additional fields in the other sections. Based on this, a typical design of a continuous form consists of creating some labels in the Form Header section and positioning their corresponding controls under them but in the Detail section. The fields can be horizontally aligned and adjacent each other. You should (strongly, if not must) avoid including Memo and OLE Objects (pictures, linked documents, etc) in a continuous form because such fields may take too much space. This would deceive the purpose of the continuous form.

Practical Learning: Designing a Subform or Subreport

  1. Open the Ceil Inn1 database you started in Lesson 29 and continued in the previous lesson. If you did not create create it, from the resources that accompany our lessons, open the Ceil Inn4 database
  2. To create a new query, on the Ribbon, click Create and, in the Other section, click Query Design
  3. In the Tables tab of the Show Table dialog box, double-click Customers, Occupancies, and Rooms
  4. On the Show Table dialog box, click Close
  5. In the lists of fields, from the Occupancies list, double-click DateOccupied
  6. In the Rooms, double-click RoomNumber
  7. In the Occupancies list, double-click RateApplied, PhoneUse, and InternetFee
  8. In the Customers list, double-click CustomerID
     
    Query
  9. Save the query as CustomerRoomUse and close it
  10. To create a new form, on the Ribbon, click Create and, in the Forms section, click Form Design
  11. Using the Properties window, set its Record Source to CustomerRoomUse and click OK
  12. Save the form as sbfCustomerRoomUse
  13. Change the following properties:
    Default View: Continuous Forms
    Record Selector: No
    Navigation Buttons: No
  14. Right-click the form and click Form Header/Footer
  15. In the Controls section of the Ribbon, click the Label
  16. Click just under the Form Header bar on the left side:
     
  17. Type Date Occupied and press Enter
  18. If the same way, add labels with the captions Room #, Rate Applied, Phone Use, and Internet Use
  19. Design and apply a font available to you. Here is an example:
     
  20. To display the Field List, on the Ribbon, click Add Existing Fields
  21. From the Field List, drag DateOccupied and drop it somewhere in the Detail section. Click its label to select it and press Delete to remove it
  22. In the same way, add the other fields
  23. Align them next to each other under their corresponding labels. Design them as you see fit under the Part label but in the Detail section
     
  24. In the Controls section of the Ribbon, click the Text Box and click under the Form Footer
  25. Using the Properties window, change its characteristics as follows:
    Name: txtTotalRateApplied
    Control Source: =Sum(RateApplied)
    Format: Fixed
  26. Add another text box to the form footer section, change its characteristics as follows:
    Name: txtTotalPhoneUse
    Control Source: =Sum(PhoneUse)
    Format: Fixed
  27. Add another text box to the form footer section, change its characteristics as follows:
    Name: txtTotalInternetFee and its
    Control Source: =Sum(InternetFee)
    Format: Fixed
     
    Subform
  28. Click the Form Footer bar and, in the All tab of the Properties window, set its Visible value to No
  29. Save, preview and close the form
  30. In the Navigation Pane, under Customers: Table, double-click Customers and, after viewing the form, switch it to Design View
  31. In the Navigation Pane, in the Customers section, drag sbfCustomerRoomUse and drop it on the form under the other control
  32. Add four text boxes under the subform and design them as follows:
     
    Label's Caption Text Box Name Format Control Source
    Phone Use: txtPhoneUse Fixed =[sbfCustomerRoomUse].[Form]![txtTotalPhoneUse]
    Internet Use: txtInternetUse Fixed =[sbfCustomerRoomUse].[Form]![txtTotalInternetFee]
    Rate Total: txtRateTotal Fixed =[sbfCustomerRoomUse].[Form]![txtTotalRateApplied]
    Net Pay: txtNetPay Fixed =Nz([txtPhoneUse])+NZ([txtInternetUse])+Nz([txtRateTotal])
  33. Save and preview the form:
     
  34. Close the form

The Single Form

A single form is the type of form that displays its data one record at a time. This concept, which was used on most forms we have used so far, can also be applied to a subform. The single layout can be valuable if you want to show one record from a related form as it is linked to a record on the current form. While a Datasheet form can clearly show that it is an embedded object, the fields of a single form can easily be mixed with those of the hosting form but it is usually determined to be apart.

A single subform is designed like a regular form where fields are created in the Detail section and other optional controls can be added to the other sections of the form. When selecting the fields that would be part of the subform, make sure you include only those that can be useful in the form that will host the subform.

Practical Learning: Designing a Single Subform

  1. Open the Bethesda Car Rental2 database you created in Lesson 30 and continued in the previous lesson
  2. To create a new form, on the Ribbon, click Create and, in the Forms section, click Form Design
  3. Save the form as sbfCustomers
  4. Using the Properties window, set the following characteristics:
    Record Source: Customers
    Scroll Bars: Neither
    Record Selectors: No
    Navigation Buttons: No
  5. On the Ribbon, click Add Existing Fields
  6. Design the form as follows:
     
    Customers Subform
  7. Save, preview, and close the subform
  8. To create a new form, on the Ribbon, click Create and, in the Forms section, click Form Desig n
  9. Save the form as sbfCars
  10. In the Properties window, click Record Source and click its ellipsis button
  11. In the Show Table dialog box, double-click Cars and Categories
  12. Click Close
  13. In the list of fields, double-click CarID, TagNumber, Make, Model, CarYear, and Category (from the Categories table)
  14. Close the Query Builder
  15. When asked whether you want to save, click Yes
  16. Using the Properties window, set the following characteristics:
    Scroll Bars: Neither
    Record Selectors: No
    Navigation Buttons: No
  17. On the Ribbon, click Add Existing Fields
  18. Design the form as follows:
     
    Cars Subform
  19. Save, preview, and close the subform
  20. On the Ribbon, click Create and, in the Forms section, click Form Design
  21. Save the form as RentalOrders and change the following characteristics in the Properties window:
    Record Source: RentalOrders
    Caption: Bethesda Car Rental - Rental Orders
  22. On the Ribbon, click Add Existing Fields
  23. From the Fields List, drag RentalOrderID and drop it in the Detail section of the form
  24. In the Controls section of the Ribbon, make sure the Use Control Wizard button is highlighted. Click Combo Box and click the Detail section of the form
  25. In the first page of the wizard, make sure the first radio button is selected and click Next
     
  26. In the second page of the wizard, click Table: Employees
     
  27. Click Next
  28. In the Available Fields list of the third page, double-click EmployeeNumber, LastName, and Title
     
  29. Click Next
  30. In the fourth page of the wizard, click the arrow of the Ascending combo box and select EmployeeNumber
     
  31. Click Next
  32. In the fifth page of the wizard, review the list and click Next
     
  33. In the sixth page of the wizard, click the arrow of the combo box and select EmployeeID
     
  34. Click Next
  35. Accept the default label and click Finish
  36. Using the Properties window, change the caption of the label to Processed By:
  37. Click the combo box. In the Properties window, change its Name to cbxEmployeeID
  38. Click the Data tab, click Row Source, and click its ellipsis button
  39. Change the third column name to Employee Name: [LastName] & ", " & [FirstName]
     
    Query Builder
  40. Close the Query Builder
  41. When asked whether you want to save, click Yes
  42. While the combo box is still selected, in the Properties window, change the following characteristics:
    Column Widths: 0";0.85";1.3";1.75"
    List Width: 3.9"
  43. In the Controls section of the Ribbon, make sure the Use Control Wizard button is highlighted. Click Combo Box and click the Detail section of the form
  44. In the first page of the wizard, make sure the first radio button is selected and click Next
  45. In the second page of the wizard, double-click Table: Customers and click Next
  46. In the Available Fields list of the third page, double-click DrvLicNumber and FullName
  47. Click Next
  48. In the fourth page of the wizard, accept the default and click Next
  49. In the fifth page of the wizard, review the list and click Next
  50. In the sixth page of the wizard, click the arrow of the combo box and select CustomerID
  51. Click Next
  52. Accept the default label and click Finish
  53. Using the Properties window, change the caption of the label to Processed For:
  54. Click the combo box. In the Properties window, change the following characteristics:
    Name: cbxCustomerID
    Column Widths: 0";1.35";1.5"
    List Width: 2.85
  55. In the Controls section of the Ribbon, click Subform/Subreport and click the form under the previously added combo box.
    If you receive a Microsoft Office Access Security Notice, read it and click Open
  56. In the first page of the wizard, in the list, click sbfCustomers and click Next
  57. In the second page of the wizard, make sure it indicated that the tables are connected through the CustomerID field and click Next
  58. Accept the suggestions of the third page and click Finish
  59. In the Controls section of the Ribbon, make sure the Use Control Wizard button is highlighted. Click Combo Box and click the Detail section of the form
  60. In the first page of the wizard, make sure the first radio button is selected and click Next
  61. In the second page of the wizard, double-click Table: Cars and click Next
  62. In the Available Fields list of the third page, double-click TagNumber, Make, and Model
  63. Click Next
  64. In the fourth page of the wizard, accept the default and click Next
  65. In the fifth page of the wizard, review the list and click Next
  66. In the sixth page of the wizard, click the arrow of the combo box and select CarID
  67. Click Next
  68. Accept the default label and click Finish
  69. Using the Properties window, change the caption of the label to Car Rented:
  70. Click the combo box. In the Properties window, change the following characteristics:
    Name: cbxCarID
    Column Widths: 0";0.75";0.85";1.55"
    List Width: 3.15"
  71. In the Controls section of the Ribbon, click Subform/Subreport and click the form under the previously added combo box
  72. In the first page of the wizard, in the list, click sbfCars and click Next
  73. In the second page of the wizard, make sure it indicated that the tables are connected through the CarID field and click Next
  74. Accept the suggestions of the third page and click Finish
  75. Using the Fields List, add the other controls
  76. Add additional text boxes and set their characteristics as follows:
     
    Rental Orders
    Label's Caption Text Box Name Format Control Source
    Sub-Total: txtSubTotal Fixed =Nz([RateApplied])*Nz([TotalDays])
    Tax Amount: txtTaxAmount Fixed =CLng(Nz([txtSubTotal])*Nz([TaxRate])*100)/100
    Rent Total: txtRentTotal Fixed =Nz([txtSubTotal])+Nz([txtTaxAmount])
  77. Save the form and switch it to Form View
     
  78. Close the form
  79. Re-open the RentalOrders form in Form View (otherwise, open the Bethesda Car Rental5 database and open its RentalOrders form)
  80. Enter the following information for the first record (ignore any field whose value is not given):
     
    Record 1 of 1
    Processed By: 28-485
    Processed For: 402-22-9644
    Car Rented: CAM-422
    Condition: Excellent
    Tank Level: Half
    Mileage Start: 6422
    Start Date: 11/23/2009
    Order Status: Car On Road
  81. Click the Next Record button Next Record and complete the new record with the following data:
     
    Record 2 of 2
    Processed By: 80-485
    Processed For: A-378-478-439-384
    Car Rented: AFW-928
    Condition: Excellent
    Tank Level: 1/4 Empty
    Mileage Start: 2028
    Start Date: 11/24/2009
    Order Status: Car On Road
  82. Click the Next Record button Next Record and complete the new record with the following data:
     
    Record 3 of 3
    Processed By: 35-079
    Processed For: M-028-662-206-814
    Car Rented: GMM-186
    Condition: Good
    Tank Level: Full
    Mileage Start: 10407
    Start Date: 11/27/2009
    Order Status: Car On Road
  83. Return to the first record and add values to the following fields (ignore any field whose value is not given):
     
    Record 1 of 3
    Mileage End: 6514
    Total Mileage: 92
    End Date: 11/28/2009
    Total Days: 5
    Rate Applied: 24.95
    Order Status: Order Completed

    Bethesda Car Rental
  84. Go to the second record and add values to the following fields:
     
    Record 2 of 3
    Mileage End: 2152
    Total Mileage: 124
    End Date: 11/25/2009
    Total Days: 1
    Rate Applied: 28.95
    Order Status: Order Completed
  85. Click the New (Blank) Record button New Blank Record and complete the new record with the following data:
     
    Record 4 of 4
    Processed By: 80-485
    Processed For: 402-22-9644
    Start Date: 01/05/2010
    Order Status: Order Reserved
  86. Click the Next Record button Next Record and complete the record with the following data:
     
    Record 5 of 5
    Processed By: 80-468
    Processed For: 368-36-4838
    Car Rented: RBL-618
    Condition: Good
    Tank Level: Empty
    Mileage Start: 8266
    Start Date: 11/30/2009
    Rate Applied: 35.95
    Order Status: Car On Road
    Notes: The customer has indicated that he will need the car for a month; that is, until the end of December 2009. The customer wanted to rent a Standard size car but there was none available. Therefore, although the customer is getting an SUV, we will apply the Monthly Standard rate.
  87. Go to the third record and add values to the following fields:
     
    Record 3 of 5
    Mileage End: 10697
    Total Mileage: 290
    End Date: 11/30/2009
    Total Days: 3
    Rate Applied: 45.00
    Order Status: Order Completed
  88. Click the New (Blank) Record button New Blank Record and complete the new record with the following data:
     
    Record 6 of 6
    Processed By: 28-485
    Processed For: S-738-384-838-784
    Car Rented: DCC-713
    Condition: Excellent
    Tank Level: 3/4 Full
    Mileage Start: 5002
    Start Date: 12/02/2009
    Order Status: Car On Road
  89. Go to the fifth record and add values to the following fields:
     
    Record 5 of 6
    Mileage End: 10114
    Total Mileage: 1848
    End Date: 12/28/2009
    Total Days: 28
    Rate Applied: 35.95
    Order Status: Order Completed

    Bethesda Car Rental
  90. Close the database
 

Previous Copyright © 2008-2016, FunctionX, Inc. Home