Access07: Hire Co : HR - Staff form

From virtualMV2015wiki
Jump to: navigation, search
 Home  MS Access <

Create form using Form Wizard

While the form buttons allow quick form creation, often you want more control. The Form Wizard (available under More Forms ) Allows you to do this

In this task we will create the staff form using the wizard.

1. With tblStaff highlighted

2. User the Create tab to select More Forms, then Form Wizard

3. Use the [>>] button to choose all fields (the [>] allows you to just select the field highlighted)

4. Select [Next]

5. Choose Columnar layout, [Next]

6. Choose a form style

7. Change the form title to frmStaff, then [Finish]

Notice that the form layout is a little cleaner than the basic form wizard (the text boxes are better sized)

Add a few more records to your staff table

.. Now back to design view.

8. As before the fields are all locked in a grid, so remove this using Form Design Tools , Arrange, then Remove.

9. Change the Field Names so that they are a lttle less "computer geek ish"

10. Finally play around with the Form Design Tools to group parts of the form (as shown in the diagram following) ..

Adding a rectangle area

a. Add a background use the Rectangle object and drag onto the form

b. To change the properties, right click on the rectangle and select properties (a panel will open up in the right of your screen)

c. Change the Back Style to Normal, and the Back color to a blue.

d. When you save this, the fields will disappear behind the rectangle, so you need to move it to the back., so right click on the rectangle and select Position > Send to back

Acc07 Hire HR frmStaff01.png

Moving a field name and attached text box

Usually the field name and associated text box move together. You can move them independently if you use the large drag handles (see diagram following).

Acc07 FormSizeHandles.png

Add a list box

You may need to widen the form area first, and close the properties pane (on the right of the screen) first.

Making sure the "use control wizards" button is on, click on the list box (shown in diagram above)

Now click on the form and drag an area for the list control

In the pop up select Find a record on my form based on the value I selected in my list box, the [Next >]

Choose the StfID, LastName and FirstName fields to display, then [Next >]

(leave the Hide key column checked), and readjust any column widths if you need to

Call the list box control lstStaff, the Finish

Now view the form

If you click on a name in the list box the form will automatically change to show the person selected.

Acc07 Hire HR frmStaff02.png

(You may want to remove the label lstStaff shown on the form - back to design view, click on the label, then tap the delete key)

Icon References.png References


Access07: Hire Co : HR - Staff form. (2017). In virtualMV's ( Michael Verhaart ) wiki. Retrieved December 18, 2017, from http://www.virtualmv.com/wiki/index.php?title=Access07%3A_Hire_Co_%3A_HR_-_Staff_form    (zotero)