business studies at campbeltown grammar...
TRANSCRIPT
QUERIES IN ACCESS - OPERATORS
Database operators: be able to use the following in a query – Equals Greater than Less than between Greater than
or equal toLess than or equal to
Or Not And Wildcard Question mark
= > < <> or between
>= <= or not and * ?
see below to find anyone who lives in Glasgow or Edinburgh
to find anyone who has both a cat and a dog
If looking for text within other text
If unsure how name is spelt, Donell or Dunell
USING AGGREGATE QUERIES
To SUM, AVERAGE, MAXIMUM, MINIMUM, AVERAGE or COUNT a field in a Query
Clicking on the Totals button on the Query ribbon will insert the Total row in the query
Data can then be grouped by
Sum Average Max Min Count
Sum, average, max and min will only perform for numerical data.
Text data can be counted using Count.
NB Count means count the number of entries whereas Sum means that the entries must be totalled.
returns
returns
TO SORT A QUERY ON 2 FIELDS
Access will sort a query in the order the sort instructions appear in the query design – left to right.
The above query will be sorted first by SURNAME then by TOWN because surname appears first, left to right.
If the query had to be sorted by TOWN then SURNAME, insert the TOWN field twice. It has to appear before SURNAME left to right across the query, but should only show once in the results so the Show box should be unticked.
Insert Town field twice – this way the query will sort first by TOWN then by SURNAME. the first time it appears it should have the sort instruction and the Show box unticked.
HOW TO CHANGE TABLE PROPERTIES
Change a text field
A text field may be preset as a certain number of characters – to limit the number of characters which can be entered into a field. Change the field size as follows: Click on field to be changed Increase or decrease the
characters as required
A number or currency field can be formatted in different ways eg as different types of currency, or different numbers of decimal placces
A date/time field can be formatted to show the date in different ways, eg short or long
CREATING FORMS IN ACCESS
TO PRINT ONLY ONE RECORD IN FORM FORMAT
Click on the field you need to search on
Use Filter button on the Home ribbon
Untick Select All Tick the required record
and click OK
To remove the filter and restore all the records, click on Remove Sort
To key in your name, use a label
Enter the label in the Page Footer NOT Report Footer
REPORTS IN ACCESS
NB Create Reports in a Table or a Query – NOT BOTH.
TO TOTAL A COLUMN IN A REPORT, EG TOTAL THE CLASS EARNINGS
In Design View, insert a text box in the Report Footer (NOT Page Footer)
Enter a formula in the Unbound box to total the field – the field name must be spelt exactly as in the table or query and enclosed by square brackets []
Data may have to be formatted - in Design view, right click on the formula, select properties and change format to currency. Move text box to margin and enter appropriate label.
Formatted