Access Notes
Access Notes
TABLES:
Pay attention to Datatypes and validation here. Validation can be done through Validation rules, Default values,
Input masks and Lookups.
Validation:
Lookup:
You will get the Input Mask Character sheet in the exam.
Do not forget that you can do calculations in tables too. Tables icon is on the Ribbon.
Primary key: Each record must have a unique identification field, called a primary key, so that the
application can find a particular record. Two records cannot contain the same data in the primary key
field.
Data type: The data type you choose for a field controls what data users can enter.
Field size: If you change the default field size to a smaller size, users will not be able to enter large
amounts of data.
Field properties: Fields have additional properties that you can set. These properties control what data
can be entered.
Index: The database application uses indexes to speed up searching and to control whether duplicate
values in an index are allowed. If the field will be used to create an index you can choose one of two
options: Yes (Duplicates OK) or Yes (No Duplicates).
Lookup column: You can give users the ability to select predefined values from a list. You use a lookup
column to do this. A lookup column is a list of entries that appears when the user clicks on a drop-down
arrow. The user can then select any of the available values.
Input mask: The input mask guides the user by displaying a number of characters when the user clicks on
the field. These characters show the user an example what the data should look like. Input masks are very
helpful when entering date and time.
Validation rule and validation text: A validation rule is an expression (or rule) that control what data the
user can enter in a field. Only data that suits the validation rule is accepted. A validation rule has
validation text that is displayed to the user to tell him or her what data to enter.
Table validation: You can create a rule that prevents data entry if the data would break a specified rule in
a table. A table validation rule can check the value of more than one field.
List box and Combo box: List and combo boxes are very similar to lookup columns. We use list and
combo boxes in forms. They both have predefined options that they user can be select. A list box
contains a scroll bar and a combo box has a drop-down arrow.
QUERIES
Operators:
Calculations in queries:
REPORTS
Important points to remember when doing calculations in reports
Where you insert the calculation will control what records the application uses in the calculation. If you
put the calculation in the report header or footer, all the records are used. If you put the calculation in the
group header or footer, only the fields that belong to the group are used in the calculation.
You must spell the field name correctly, and you must place the field name in square brackets.
The calculation must suit the field type. For example, you cannot use the SUM or AVG function for a
text field.
You must type calculations in text boxes.
You must start all calculations with an equal (=) sign.
Add a suitable label to describe the calculation.
Conditional formatting
To change the way information looks on a report or form, first select the Text box or Combo box.
On the Format tab in the Control Formatting group, click on the Conditional Formatting button.
FORMS
A form in Access is a database object that you can use to create a user interface for a
database application. A "bound" form is one that is directly connected to a data source
such as a table or query, and can be used to enter, edit, or display data from that data
source.
Alternatively, you can create an "unbound" form that does not link directly to a data source, but which still
contains command buttons, labels, or other controls that you need to operate your application
Form Header
In the form header, you are generally required to give the document a suitable title.
Whatever you named your form, will appear in the header by default.
You can also insert and image into the form header:
You can change the background fill colour by right clicking on the header (or other section
you want to change) and select Fill/Back Color.
Form Buttons
You can insert buttons in order to make your form more user friendly. Add a button by
doing the following: