Lesson 2
Home Up Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5

ASCII table

Assignment 2

Creating Objects & Changing Properties

Creating Objects or Controls

Click on the Object you want to create from the Toolbox. For this course we want to create controls without the wizard active. To turn off the wizard, click on the wizard so the background turns darker grey.

wpe1.jpg (4697 bytes)Toolbox

After selecting the control, move the mouse over to the form and drag the mouse to the approximate size and position you want.

Use the handles to position and resize the control to your needs.

Frequently used Objects or Controls

Text box control wpe3.jpg (834 bytes)

This control allows the user to enter text into. It can also be bound to data in a table to display data or edit data. txt is the prefix for the name.

Label control wpe2.jpg (746 bytes)

This control is used to put text on the form. In most cases this control is not used with code, so it does not need a valid Name. However, if it is used in code, then the Name must be changed to a valid name, with lbl as the prefix.

Command button control wpe6.jpg (762 bytes)

This control is used to connect actions to so that the user can signify the beginning of a process. cmd is the prefix.

Option button control wpe2.jpg (784 bytes)

This control is used to choose a mutually exclusive selection from a group. If contained within a frame control, this makes all contained option buttons part of a group. opt is the prefix.

Check box control wpe3.jpg (783 bytes)

This control is used to choose a variable number of options from a group. If contained within a frame control, this makes all contained check boxes part of a group. chk is the prefix.

Frame control wpe6.jpg (811 bytes)

This control contains groups of controls. To make a group the frame must be created first then each of the contained controls must be created inside the frame. fra is the prefix

Combo box control wpe4.jpg (817 bytes)

This control displays lists of data. It also contains a portion that is similar to a textbox that allows the user to add items into the list. cbo is the prefix

List box control wpe5.jpg (810 bytes)

This control displays lists of data. lst is the prefix.

Changing Properties

Changing most of the properties involves selecting options from a combo box. So these properties can only take certain values. These properties have an arrow to the right of the box, click on this button and the options will appear. An example is shown below:

wpe2.jpg (1696 bytes)

Some properties are changed by typing in the data you want. Typical properties of this type is the Name property of most objects. You will change the name of all controls except label controls not involved in Visual Basic code. An example is shown below:

wpe4.jpg (2479 bytes)

A few properties are set using a dialog box. These properties have an ellipsis to the right of the box, click on this ellipsis and the dialog box will appear. An example is shown below:

wpe5.jpg (1790 bytes)

Using Help

If you are unsure of how to fill out a property, then position the cursor at the property you want to change and press F1 to get help from Access.

Assignment