COURSE ON ACCESS
In this module, you will learn to:
Start ACCESS
Close ACCESS
-Read the elements of an ACCESS window
Create databases in tables
Make requests
Create forms
Create states.
Access is a relational database management system designed by Microsoft to enable
to enable managers to memorize and query their department databases.
These uses are multiple:
It allows for managing stocks and preparing employees' pay slips.
1 /Starting ACCESS
To start ACCESS, you have two options:
Use the Start menu
You go to Start, then Programs and click on Microsoft ACCESS
Use the shortcut on the desktop
Position the Microsoft ACCESS icon and double click on it
The ACCESS window opens. It appears as follows
Select New
database
2. Click on Ok
3. Click on the Create button when the dialog box appears.
Then the different components of the ACCESS window are displayed.
2/The components of the ACCESS window
3/ Closure (Stop) of ACCESS
To stop ACCESS:
Press the Alt and F4 keys simultaneously
2. Click on the close button located on the right side of the window
3. Use the Quit command from the File menu
4/ Create databases in the tables
Creating a database is no easy task. Indeed, one must first think about the
nature of the database to be created, the fields that will appear in the databases, the length of the fields,
the types of fields, etc.
This initial work of reflection is very important and must be done in draft form before proceeding.
lancer dans la machine. Donc une base de données bien structurée sur le brouillon est comme
a computer program that runs on paper.
Define a table with the Assistant
Ouvrez la base de données dans laquelle vous voulez créer une nouvelle table en utilisant la
Open command in the File menu, the keyboard shortcut Control + O or the Open icon
from the Database toolbar.
Click on the Tables entry in the objects bar, then double-click on the Create entry.
table with the help of the Assistant. This will cause the display of the window below
Click on the button symbolizing a > sign to take the fields one by one into the
cageChamps in new table or click the button with the two signs >> to
Transfer all fields from Fields to new table.
You will have the following window
Click on the Next button and the window below will appear
Click on the Finish button
Choose:
-Modifier la structure de la table pour afficher la table en mode création.
Enter the data immediately into the table to display the table in Sheet mode.
data.
Enter the data into the table using a form that the Assistant creates for me
create and display an input form.
Define a table by entering data.
Open the database in which you want to create a new table.
Click on the Table entry in the Objects bar, then click on the Create a table entry.
entering data.
Manually define a table
Open the database in which you want to create a new table.
Click on the Table entry in the Objects bar, then double-click on the Create entry.
table in Creation mode. A new table called Table1 appears.
The table window includes three columns:
-Nom du champ : saisissez ici le nom de chaque champ. Exemple : pour une base de données
students, you can choose the fields (last name, first name, date of birth, place of birth,
address, degrees, etc. These fields are different from those in a database on
books.
Data types: defines the nature of the data (text, number)
-Description : Entrez dans ce champ ( qui est facultatif ) un commentaire.
The types of fields
When you click in the Data Type cell, Access asks you to specify the
field type by selecting one of the predefined types below:
Text fields can contain text and numbers with a maximum
is 255 characters.
Memo: Memo fields contain texts and numbers with a maximum of
65,535 characters
Numeric: Numeric fields contain only real integer numbers.
Date/Time: The Date/Time fields contain dates ranging between the years
100 and 9999 and hours coded on 12 or 24 hours.
Monetary: The monetary field contains monetary data.
AutoNumber: The AutoNumber fields define counters for incrementing.
automatically.
Yes/No: The boolean fields Yes/No accept values Yes/No, True/False
Active/Inactive
OLE Link: The OLE Link fields allow for storing data from
spreadsheets, charts, sounds or videos.
Hyperlink: The Hyperlink fields can contain the full path
from a local file or the URL of a remote file.
Choice list:
Define the relationships between the tables
ACCESS, which is a relational database management system, allows you to define
relations between the different tables of a database.
There are two types of relationships:
One to many or many to one. This is the most common type.
One by one.
To define the relationships between the tables of a database:
1. Launch the Relations command from the Tools menu or click on the icon
Database Toolbar Relations
(After displaying the Relations window)
2. Add the tables to be related one by one, then press the button
Close
To define a relationship, point to one of the fields in a table and move it to the field.
correspondent in the other table while keeping the left mouse button pressed.
You will notice the opening of a dialog box.
Create a database step by step with the Create Database mode.
creation
Let's take the example of a Students database from EBAD.
We will first reflect on the different fields that will appear in our database.
data. For a Students database, it is essential to mention the fields
following:
-nom
first name
date of birth
place of birth
-address
-section
degrees
-cycle
You must also report the types of fields, the description, the indexing, etc.
reflection should be done on a draft. Once this work is finished, you can pass it on to the
machine.
Launch ACCESS
2. Click on New database
3. Click OK
After displaying the New Database File window
4. Click on the Create button
5. Double-click on Create a table in Design mode
The window opens and you can fill in the fields.
Save your document (you can take the name it suggests by default:
table1.
If he asks you, do you want to create a sort key, answer YES.
Your database has finally been created.
To launch it and start entering your data, double-click on Table1 (or the name
that you gave him.
The window below will be displayed
To create a new table:
1. Click on New in the Tools bar of the DB: Database window.
2. Choose Creation mode in the New Table window.
3. Click OK.
Thus for a books database, we will have the fields (author, title, date, place, keywords,
etc. )
After entering the data, you will have a window that looks like this.
You can conduct research on this database. This is called the
queries in ACCESS.
5/ Creation of queries
To make queries on our Students database
1. Click on Query from the Objects bar of the Database window
2. Press the New button
3. Choose the Simple Query Assistant (which is the easiest way to create
a request
4. Click OK.
5. Select the fields on which the query will be based by pressing the
button > ( arrow to the right )
5. Click on the Next button
6. Click Finish and the request window will appear
In this example, you can query all these fields
Let's do a search on the field of place of birth.
For example, let's search for all the students who were born in Dakar.
To do this:
1. Click on the Tools menu Edit or choose View then Mode
create and type Dakar in the birthplace field on the Criteria line
as indicated by the window below
2. Click on the Tools menu display or on the View menu and then Sheets
of data to display the query results as indicated by the window
You can also query multiple fields and use the operators.
booleans (AND, OR, NOT or comparison operators (< less than
> greater than or <= less than or equal to and >= greater than or equal to)
Example: If you are looking for students who were born in Dakar and Kaolack, you
type in the Criteria zone Dakar OR Kaolack.
Example of querying with comparison operators:
1960 ET < 1980
6/ Creation of forms
The form facilitates the presentation of data and simplifies their entry.
To create a form:
1. Click on the Form entry in the Objects bar of the Base window.
data.
3. Press the New button on the Toolbar
4. Click on Form Assistant
5. Click OK
The Form Assistant window appears
6. Transfer the available field items to Selected Fields
7. Click on the Next button
After the display of this window
8. Click on the Next button
Following the display of the window below
9. Click the Finish button
And your form is displayed as follows. It is advisable to create your forms.
with the ACCESS Assistants
7/ Creation of states
States allow printing data from tables or forms.
To create a state, you have two options:
With the help of an Assistant
Manually, in creation mode
We are going to create a state using the Assistant:
1. Select the entry States in the Objects bar of the Database window
2. Press the New button and ACCESS displays the window below
3. Click the OK button.
4. Click the >> button to switch all Available Fields to Fields
selected
After transferring the available fields to Selected fields,
5. Click the Next button again
When this window appears, click on the Next button.
After displaying the window below, choose your Presentation and your Orientation
then click on the Next button
Keep clicking
on the Next button
until the display of
the last window
with the button
Finish.
The last window of our state displays as follows.
You notice
that a sorting
alphabetical a
was carried out at
names of
students.
Exercise
Create a documentary database on ACCESS with 50 references from the
documents of your documentary structure.