Microsoft Access Lessons Home

Properties of Database Fields

 

Properties Categories

 

Introduction

Properties are set by changing their values and there are various types of properties. A property is made of two parts: its name and its value:

The name of a property displays on the left gray section. 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. On this site, a property will be called by what displays on that left gray section. This means that, if a property displays "Height", we will call it "The Height Property". If it displays "Whats This Button", we will call it "The Whats This Button Property".

The second part of a property displays on the right side of the property name. This is called the value of the property. As properties are intended to fulfill different purposes, there are various categories of properties.

String Properties

When a property value displays a word or a group of words, such a word or group of words on a field is called a string.  Some of those properties 

already display a value while some others are empty. To set or change such a string, if it is already displaying something, it depends on whether you want to replace the property value or edit it.

To replace the value of a string property, you can click the property name. This would highlight the value. You can then type the desired value, which would replace whatever text the property was displaying. If the property value was empty, you can click the property name and type the desired value. If the property already had a value and you want to edit it, you can click in the value field to position the cursor in the string; then you can use your knowledge of text editing (Home, End, Backspace, Space, and arrow keys) to change the text.

To put the string into edit mode, you can also click the property name, which would highlight the value, then press F2 to position the cursor into the field. If you press F2 again, you would highlight the contents of the field. This means that F2 toggles edit and selection modes. To edit a string already contained in the field, you can also double-click it, which would put it into edit mode.

There are various types of string properties on forms, reports, and other controls. Examples include, among others, the control's name or its caption.

Practical Learning: Viewing String Properties

  1. To see examples of string properties, in the Properties window, click the Data tab and click Filter. Notice that it is empty and expects a value
  2. Click Order By to see an example of another string property

Boolean-Based Properties

Some fields behave like a True or False answer to a question. Such fields can display only one of two values. Both values come in a combo box that displays as the property’s value. There are three categories of these fields in combinations 

of Yes/No, True/False, or On/Off. To change the value of the field, you can first click the property name to reveal its combo box. Then click the arrow of the combo box and select the other value. You can also double-click the property name or its value. This would toggle with the opposite value. With experience, you can also type the first letter of the value, such as y or n and Microsoft Access would complete with the corresponding value.

 

 

Practical Learning: Viewing Boolean Properties

  1. To see examples of Boolean properties, in the Properties window, click the Format tab
  2. Click Record Selectors and notice that it displays an arrow in the property value side. Click that arrow and notice that the list is made of Yes and No
  3. In the same way, examine the Navigation Buttons and the Dividing Lines properties

Enumerated Properties

A set is a list of words that composes the possible values of a property. The list, which is static, which means it cannot be changed, comes as a combo box

where the user (in this case the user is the database developer) can select one item from. To access the value of such a property, you can click the property name to reveal its combo box. To change the property value, click the arrow of the combo box and select the desired value from the list. You can also 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.

Practical Learning: Viewing Enumerated Properties

  1. In the Properties window, click the All tab and click Default View
  2. Click its arrow to see its list of values
  3. Scroll down and click Border Style. Then click its arrow to view its list

Numeric Properties

Some properties, like the string fields, expect you to provide a value. In this case the value must be numeric. There are two types of numbers you will be asked to provide, depending on the property.

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 possibly be directed to do. The other type of number will be decimal. 

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. Then you can type the desired value. You can also edit the value by clicking the value itself, which would put it into edit mode.

Some numeric properties, such as the color properties, allow you to either type a number (provided you know what number you are typing) or to use an intermediary approach (namely a dialog box) to select an appropriate value.

Practical Learning: Viewing Numeric Properties

  1. In the Properties window, click the Format tab
  2. Scroll down to examine the Width and the Grid X properties

Expressions Properties

Some properties display a value that is a more elaborate string. If you know what value the property should display, namely an expression, 

you can just type it. Otherwise, Microsoft Access provides intermediary steps that you can follow to create or build the value. We will see examples of those when we study expressions and queries.

Practical Learning: Viewing Expression Properties

  1. In the Properties window, click the All tab. Scroll down and click Picture
  2. In the right section, click the ellipsis button. Notice that a dialog box is called
  3. Click Cancel on the Insert Picture dialog box
  4. Close the form. If you are asked whether you want to save it, click No
 

Previous Copyright © 2002-2004 FunctionX, Inc. Next