Microsoft Access Design Objects: The Properties Window
When designing a form or a report, one of the objects you will regularly use is called the Properties window. To get the Properties window of the properties associated with a control, while the form or report is in Design View, right-click the object and click Properties. To display the Properties window for the form or the report in Design View:
Any of these actions would display the Properties window. The Properties window is dockable. This means that you can drag its title bar and position it either in the middle of the screen or to the left or the right side of the screen:
There are various ways you can close or hide the Properties window:
The title bar of the Properties window displays the Property Sheet string. Under the title bar, a label identifies the type of object whose characteristics the Properties window is displaying. Under the label, there is a combo box that displays the name of the object whose characteristics are displayed in the Properties window. To change the object whose properties you want to access:
Made of five property pages, the Properties window displays the characteristics associated with the object or the control that is selected on the screen or in its top combo box.
In our introductions to Windows controls, we learned how to position some objects on a form or a report and how to specify their sizes. These two aspects, the location and the size, are referred to as characteristics of an object. In computer programming or in application development, a property is a piece of information that describes an object. Therefore, a property can be the location (position) of an object, its size, its color, its text, or anything that characterizes it. Some properties of an object are visible and can be set by you the database developer. Some properties can be set or changed by the user when interacting with the computer (but you should be able to predict or control what the user can or should do). Some other properties can be changed by either you or the user.
As seen in the previous lessons, there are various ways you can change the properties of a control but the table, the form, or the report must be displaying in Design View. The properties of an object can be accessed from the Properties window. The table on one hand has a different way of dealing with properties than the form or report on the other hand.
In order to change a property, first open the table, the form, or the report in Design View, click the object whose property you want to change. In the Properties window, locate the property you want to change and click it. Each field in the Properties window is divided in two sections: its name and its value:
The left column of the a tab in the Properties window
displays the name of a property. Although you can click it to select it, you cannot change it. The property name can be made of one word such as
Width. It can also be made of a combination of words, such as Border
Style. Regardless, in our lessons, each property will be called by what displays on that left
column. This means that, if a property displays "Width", we will call it "The
Width Property". If it displays
"Allow PivotTable View", we will call it "The Allow PivotTable View Property".
String Properties: Some values of properties can be made of one or more characters or words. Here is an example:
To change the value of a string property:
Numeric Properties: A property is called numeric if
it must hold an integral or decimal value.
An integer is a natural number that does not take a decimal portion. Such a number can be made of digits only. For such a field, make sure you provide an integer of appropriate range, as you will be directed to do.
A decimal number, also called a floating-point number, can be made of digits or a combination of digits and one period (or the symbol used as the decimal separator in your language; you can find this out in the Regional Settings of the Control Panel) in between. When setting such a value, make sure that either you type only digits, or you type digits and one decimal separator. The decimal separator can be anywhere in the value, Microsoft Access would take care of formatting it if it judges it necessary.
Some numeric properties, such as the color properties, allow you to either type a number (provided you know what number you want to use) or to use an intermediary approach (namely a dialog box) to select an appropriate value.
Expressions Properties: Some properties are made of a combination of specific characters and digits. Examples are the format of a date or time, the concatenation of strings to produce another string. To specify the expression, you can use the same approach we described for a string. After entering the expression, Microsoft Access would analyze it. If you respect the rules of the type of expression you are supposed to create, it would be used. If you enter a wrong expression or Microsoft Access cannot identify what the expression would produce, you may get either an error or an unpredictable result.
Boolean Properties: A property is referred to as Boolean if it can have only either a Yes or a No value, an On or an Off value, a 0 or no 0 value. Both values of the property are stored in a combo box. To change the value of Boolean property:
Enumerated Properties: Some properties provide a list of options as the possible values of the property. The list, which cannot be changed, comes as a combo box from where you can select one item. To change the value of an enumerated property:
|Home||Copyright © 2008-2012 FunctionX|