Professional Documents
Culture Documents
Ms Access 2010: Presented by Mohamad Zakie Shafie Pegawai Teknologi Maklumat F44 Hospital Tanah Merah
Ms Access 2010: Presented by Mohamad Zakie Shafie Pegawai Teknologi Maklumat F44 Hospital Tanah Merah
Ms Access 2010: Presented by Mohamad Zakie Shafie Pegawai Teknologi Maklumat F44 Hospital Tanah Merah
DAY 1
Part 1 : Understand of Database Concept & Terminology
Part 2 : MS Access Interface
Part 3 : Working with Table, Queries, Form and Report
DAY 2
Part 4 : Working with Table
Part 5 : Working with Queries
Part 6 : Working with Form and Form Wizard
Part 7 : Working with Report and Report Wizard
Part 1 : Understand of Database Concept
& Terminology
Database based collection of data. Simple DB is phonebook.
Data - organized in some manner so that the information contained within the
database can be easily retrieved.
Field (Column) : a single piece of information. Could be a name, or a number. In
some cases, it may even be a null or empty value
Record (Row) : a collection of related fields. A number of pieces of information that
relate to the same object.
Contoh rekod pekerja : nama, nokp, jawatan, penempatan, alamat, notel, emel dll.
Database is collection of tables. Cth Di Klinik, perlu table pekerja, table pesakit,
table rekod rawatan harian pesakit.
Combination of table akan membentuk satu DB.
Part 1 : Understand of Database Concept
& Terminology (Cont..)
What different MS Access (Relational DB) vs MS Excel ?
Example : company records on a series of Excel spreadsheets, we want to pull
information from each table from spreadsheets, use information as one
spreadsheet as basic.
Relational DB - allows users to create, maintain, and query your data in the
related tables.
Others Relational DB - Microsoft SQL Server, Oracle, FoxPro, Rbase dll
What different MS Access with Other RDB ? Desktop DB Intended for 50,000
records (small scale of application) not more than 3 concurrent user.
Access allow 1 Gb size or contain 32,768 Objects. Objects being tables, queries,
reports, etceverything is kept in a single container. Files extension mdb
Part 1 : Understand of Database Concept
& Terminology (Cont..)
Primary Key vs Foreign Key ?
Primary Key - a value that is unique to each record.
Foreign Key - a primary key of one table included in another table.
Primary Key
Employee Table
Part 1 : Understand of Database Concept
& Terminology (Cont..)
CustomerID Name Address Phone Number
100 Lyons 123 A Street 916-444-5585
101 Dennys 435 Elm Street 916-478-2325
102 IHOP 654 17th Avenue 916-458-7714
Customer Table
Memo Long blocks of text and text that use text formatting. A typical use of a Memo field would
be a detailed product description.
Number Numeric values, such as distances. Note that there is a separate data type for currency
Auto Number Numbers that are automatically generated for each record.
Attachment Files, such as digital photos. Multiple files can be attached per record. This data type is not
available in earlier versions of Access
Calculated
Note :
Combo Box One data display at on time when transform to Form
List Box All list display when transform to Form
Part 4 : Working with Table(Cont)
Character of Input Mask
Character Explanation
0 User must enter a digit (0 to 9).
9 User can enter a digit (0 to 9).
# User can enter a digit, space, plus or minus sign. If skipped, Access enters a blank space.
Characteristic Description
Field Size Menentukan saiz character input
Format Nombor+Huruf
Input Mask
Validation Text
Part 5 : Working with Queries
The most common type of criteria query use arithmetic operators to set the
rules.
Arithmetic Operator - restrict the data to what you need to see; results (called
datasets) from a query are a snapshot in time; adds or changes a record need to
rerun.
Logical Operator - needed to build a query; time to bring the queries into the
context of a relational database
Table Relationships
Part 5 : Working with Queries(Cont.)
Calculated Queries
Example What effect a ten percent discount of your product.
Aggregate Queries
Access are a used to create and view some common statistics about a field in a
table. Statistics on the same field, so start by dragging that field to the QBE grid as
many times as necessary.
Totals toolbar button . This will add another
Field to be QBEGrid.
Part 5 : Working with Queries(Cont.)
To includes records that.. Use this Criterion Query Result
Exactly match a value, such as China "China" Returns records where the CountryRegion field is set to China.
Returns records where the CountryRegion field is set to a
Do not match a value, such as Mexico Not "Mexico"
country/region other than Mexico.
Returns records for all countries/regions whose names start with
Begin with the specified string, such as U Like U*
"U", such as UK, USA, and so on.
Do not begin with the specified string, Returns records for all countries/regions whose names start with a
Not Like U*
such as U character other than "U".
Contain the specified string, such as Returns records for all countries/regions that contain the string
Like "*Korea*"
Korea "Korea".
End with the specified string, such as Returns records for all countries/regions whose names end in "ina",
Like "*ina"
"ina" such as China and Argentina.
Do not end with the specified string, such Returns records for all countries/regions that do not end in "ina",
Not Like "*ina"
as "ina" such as China and Argentina.
Contain null (or missing) values Is Null Returns records where there is no value in the field.
Follow a value, such as Mexico, when Returns records of all countries/regions, beginning with Mexico and
>= "Mexico"
sorted in alphabetical order continuing through the end of the alphabet.
Part 5 : Working with Queries(Cont.)
To includes records that.. Use this Criterion Query Result
Fall within a specific range, such as A Returns records for countries/regions whose names start with the
Like "[A-D]*"
through D letters "A" through "D".
Match one of two values, such as USA or
"USA" Or "UK" Returns records for USA and UK.
UK
Contain one of the values in a list of In("France", "China",
Returns records for all countries/regions specified in the list.
values "Germany", "Japan")
Contain certain characters at a specific Right([CountryRegion], 1) Returns records for all countries/regions where the last letter is
position in the field value = "y" "y".
Part 6 : Working with Form and Form
Wizard
Get from Table or Query
Part 6 : Working with Form and Form
Wizard(Cont)
Part 7 : Working with Report and Report
Wizard
Source data from Table or Query