|
Creating Objects & Changing PropertiesCreating Objects or ControlsClick 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. 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 ControlsText box controlThis 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 controlThis 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 controlThis control is used to connect actions to so that the user can signify the beginning of a process. cmd is the prefix. Option button controlThis 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 controlThis 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 controlThis 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 controlThis 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 controlThis control displays lists of data. lst is the prefix. Changing PropertiesChanging 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: 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: 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: Using HelpIf 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. |