0% found this document useful (0 votes)
13 views

Access CheatSheet

Uploaded by

xemmaguzman14
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Access CheatSheet

Uploaded by

xemmaguzman14
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CAccess “Cheat Sheet”

When you open Access:


Single click on a blank new database so that you can create a name for the database.

Table creation sequence:


Customer, product, coupon, order, order line, return. So that you could link FKs to the
associated PKs.

When creating tables:


1. Design View: In this view, you can add the attributes in a class to Access and define
the data type for each attribute.

2. Datasheet View: In this view, you can add records to a table.


3. To create a calculated field, please make sure that you create the attributes that will
be used in the calculation and save it first.

Before creating queries:


1. Please make sure that you have saved all your tables.
2. Please make sure that your relationship in Access is the same as your class diagram.
3. Make sure that you have matched the correct pair of PK and FK in the relationship.

When creating queries:


1. Identify what tables/classes you need for the query
2. Identify what attributes you need for the query

Query functions:
1. Date selection: from m to n
Type the following in the Criteria: >m-1day and <n+1day
e.g. September (m will be September 1st, n will be September 30)
> 08/31/2020 and <10/01/2020

2. Exact match of text: XXXX


Type the following in the Criteria: “XXXX”
e.g. NY
“NY”

3. Contain words: XXXX


Type the following in the Criteria: like “*XXXX*”
e.g. NY
like “*NY*”

4. Aggregation Functions: Sum/Max/Average…


Select totals from the design tool bar
Group by the group (e.g. order ID) and select the function (e.g Sum) that you need for
the calculation

5. Create new calculations in the query. Refer to the attributes/columns by the column
name.
e.g. Calculate total price for a product in an order that has discount
Total price: [Purchase Amount]*[Price]*(1-[Discount Percentage]/100)
Words in red is the new column name that you want to set
Words in blue are the math function, please use [] outside of each column name, a
column name should be an exact match with what you have in your table.

You might also like