Sie sind auf Seite 1von 8

Assignment Access

Questions:
1. How to create a table:
a.

Click on Create Tab

b.

Click on Table Design Button

c.

You will see the table designation windows appear

d.

Enter fields name and its data type as below:

e.

Set field stdid to Primary Key (Not allow duplicate data for stdid) by Right Click on that field
and choose Primary Key

f.

Click <Ctrl-S> to Save the Table

2. How to create a query:


1. On the Message Bar, click Options.
2. In the Microsoft Office Security Options dialog box, click Enable
this content, and then click OK.
If you don't see the Message Bar
On the Database Tools tab, in the Show/Hide group, click Message
Bar.
Create the select query
NOTE If you already have a select query that produces the data
that you need, go to the next steps.
1. On the Create tab, in the Other group, click Query Design.

1. In the Show Table dialog box, double-click the tables from which you
want to retrieve data. Each table appears as a window in the upper
section of the query designer. Click Close when have finished adding
the tables.
2. In each table, double-click the field or fields that you want to use in
your query. Each field appears in a blank cell in the Field row of the
design grid. This figure shows the design grid with several table fields
added.

3. Optionally, add any expressions to the Field row.


4. Optionally, add any criteria to the Criteria row of the design grid.

5. Click Run
to run the query and display the results in a datasheet.
6. Optionally, change your fields, expressions, or criteria and rerun the
query until it returns the data that you want to place in your new table.
3. How to create a form:

Access makes it easy to create a form from any table in your database.
Any form you create from a table will let youview the data that's already
in that table and add new data. Once you've created a form, you can
modify it by adding additional fields and design controls like combo
boxes.
1. In the Navigation pane, select the table you want to use
to create a form. You do not need to open the table.
2. Select the Create tab, locate the Forms group, and click
the Form command.

3. Your form will be created and opened in Layout view.

4. To save the form, click the Save command on the Quick


Access toolbar. When prompted, type a name for the
form, then click OK.

4. How to create a reports:

Reports give you the ability to present components of your database in


an easy-to-read, printable format. Access lets you create reports from
both tables and queries.
1. Open the table or query you want to use in your report.
We want to print a list of cookies we've sold, so we'll open
the Cookies Sold query.

2. Select the Create tab on the Ribbon. Locate


the Reports group, then click the Report command.

3. Access will create a new report based on your object.


4. It's likely that some of your data will be located on the
other side of the page break. To fix this, resize your
fields. Simply select a field, then click and drag its edge
until the field is the desired size. Repeat with additional
fields until all of your fields fit.

5. To save your report, click the Save command on


the Quick Access toolbar. When prompted, type
a namefor your report, then click OK.

Just like tables and queries, reports can be sorted and filtered.
Simply right-click the field you want to sort or filter, then select the
desired option from the menu

5. How to create a relationships:


1.

Click the Microsoft Office Button

2.

In the Open dialog box, select and open the database.

3.

On the Database Tools tab, in the Show/Hide group, click Relationships.

4.

, and then click Open.

If you have not yet defined any relationships, the Show Table dialog box
automatically appears. If it does not appear, on the Design tab, in
the Relationships group, click Show Table.

The Show Table dialog box displays all of the tables and queries in the database. To
see only tables, clickTables. To see only queries, click Queries. To see both,
click Both.
5.

Select one or more tables or queries and then click Add. After you have
finished adding tables and queries to the Relationships document tab, click Close.

6.

Drag a field (typically the primary key) from one table to the common field
(the foreign key) in the other table. To drag multiple fields, press the CTRL key, click
each field, and then drag them.
The Edit Relationships dialog box appears.

7.

Verify that the field names shown are the common fields for the relationship. If
a field name is incorrect, click on the field name and select the appropriate field from
the list.
To enforce referential integrity for this relationship, select the Enforce Referential
Integrity check box. For more information about referential integrity, see the
section Enforce Referential Integrity
In addition, see the article Guide to table relationships.

8.

Click Create.
Access draws a relationship line between the two tables. If you selected the Enforce
Referential Integritycheck box, the line appears thicker at each end. In addition,
again only if you selected the Enforce Referential Integrity check box, the
number 1 appears over the thick portion on one side of the relationship line, and the
infinity symbol () appears over the thick portion on the on the other side of the line,
as shown in the following figure.

Das könnte Ihnen auch gefallen