Home

Microsoft Access Design Objects: The Properties Window

 

Introduction

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:

  • You can double-click the button in the top-left section under the tab or the title bar
  • In the Design section of the ribbon, you can click the Property sheet button Property Sheet
  • You can right-click anywhere on the form or report and click Properties

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:

Properties

There are various ways you can close or hide the Properties window:

  • In the Design section of the ribbon, when the Property Sheet button is highlighted , this means that the Properties window is currently displaying. To close or hide it, you can click the same button and it looses its highlighting Property Sheet
  • As a regular window, you can click its close button Close to hide it
  • You can right-click either the form, the report, or any control that is displaying in the Design View and click Properties
  • When we get to the Field List, we will see another action that hides 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:

  • You can click the form, the report or the control
  • You can select its name in the combo box of the Properties window

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.

Properties Fundamentals

 

Introduction

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.

Types of Properties

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".

The right column of a tab of the Properties window displays the name of the property. This is referred to as the value of the 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:

  • You can click it to select it and then type over it
  • You can double-click it to put the caret in the value, and then edit it

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.

To change the value of a numeric property:

  • You can click the property name to highlight the property value and type the desired value
  • You can double-click the value to put it into edit mode and change the value

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:

  • You can click the property name to display its combo box, then click the arrow of the combo box and select the desired value
     

  • You can double-click the property name or its value. This would change to the opposite value
  • You can click the property name, type the first letter of the value, such as y or n and Microsoft Access would complete with the corresponding value

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:

  • You can click the property name to reveal its combo box, click the arrow of the combo box and select the desired value from the list
  • You can double-click either the property name or the property value. This would display the next value in the list. You can keep double-clicking until the desired value comes up
  • If you know the values in the list (from experience), you can type the first letter of the desired value and Microsoft Access would complete it with the corresponding value. If you try typing a value that is not in the list, you would receive an error
  • You can click the property name or its value, press Alt + down arrow key to display the list, press the down arrow key to select the desired value, and press Enter or Tab
 

Home Copyright © 2008-2012 FunctionX