SlideShare una empresa de Scribd logo
1 de 36
Introduction to MS Access
Steve Shapiro
Computer Services Manager
Office of Research Services and Administration
University of Oregon
Region VI/VII NCURA Conference
April, 2011
1
What is a Database?
• a comprehensive collection of related data
organized for convenient access, generally in a
computer
dictionary.reference.com/browse/database
• This definition was found via a search of Google’s database
• Databases are all around us, and all of us interact with them
on a daily basis.
• Who said you can’t make your own?
2
Where does MS Access fit?
• http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems
lists history for about 50 database programs
• Popular Databases:
Oracle, Microsoft SQL Server, IBM DB2, FileMaker, Ingres, MySQL, Corel Paradox, Dbase III,
R:Base
• MS Access is a low-end to mid-tier database application
– It runs independently on workstations for single users
– It runs on servers that can be accessed by multiple users at the same time on a network
– It provides a user friendlier front end to more powerful database applications such as Oracle and MS SQL Server
3
What is MS Access?
• MS Access is a relational database, meaning
that data is stored in multiple tables that are
related to each other.
– PI’s in one table, their awards in another table.
The database maintains a connection between the
tables using something called a ‘key’ – a number
that is the same in both tables.
4
History
• Access is one of the few products originally developed
by Microsoft
• Development began in the mid 1980’s
• Combined with other databases that Microsoft
licensed such as R:Base and FoxPro
• Released in November 1992 as a single user application
for very small (<10mb) files
• Became dominant database for windows when
competitors failed to transition to Windows
successfully.
• Now a very stable and robust application, scaling from
1 to many users and up to 2g of data in each file
5
Today’s Session
• Will cover < 1% of MS Access capability
• We won’t talk about
– Security
– Advanced anything
• Forms, queries, front/back ends, modules, macros
– Interfacing with other databases
– Advanced Data Validation
– Questions on these and other topics are welcome!
6
Relational Database?
7
Keys relate information
in different tables
8
5 Major Components of Access
Access Database Objects
• Tables
• Queries
• Forms
• Macros
• Modules
9
Tables
Tables hold the information, called data
10
Tables - Data Types
• Text Use for text or combinations of text and numbers, such as addresses, or for numbers
that do not require calculations, such as phone numbers or postal codes (255 characters)
• Memo Use for lengthy text and numbers, such as notes. Stores up to 63,999 characters
• Number Use for data to be included in mathematical calculations, except money
• Date/Time Use for dates and times
• Currency Use for currency values and to prevent rounding off during calculations.
• AutoNumber Use for unique sequential that are automatically inserted with a new record
• Yes/No Use for data that can be only one of two possible values, such as Yes/No, True/False,
On/Off.
• OLE Object Use for OLE objects (such as Microsoft Word documents, Microsoft Excel
spreadsheets, pictures, sounds,
• Hyperlink Use for hyperlinks (hyperlink: Colored and underlined text or a graphic that you
click to go to a file, a location in a file, a Web page on the World Wide Web, or a Web page on
an intranet. Stores up to 2048 characters.
• Lookup Wizard Use to create a field that allows you to choose a value from another table or
from a list of values using a combo box
11
Table Encounter
• The prospect of creating multiple tables almost always
intimidates beginning database users. Most often, beginners
will want to create one huge table that contains all of the
information they need, similar to an Excel spreadsheet.
• When thinking about which fields to add to a table, a good
first guess is: What piece of information will only occur once?
– Such as
• A person will probably only have one first name, though it may change
– First_Name is a good candidate for the “PI” table
• A table needs at least on field that never duplicates in the same table
– Two or more people can have the same first, last and middle names
• A person may have more than one award (per name)
– The award title is not a good candidate for the PI table, since we don’t know how many awards a person
may have
12
Queries
• Queries select and modify
specific data
• “Queries convert data to
information”
• They are used to populate forms
and reports
• MS Access uses a visual query
wizard to help novice (and
advanced!) users construct
queries
13
Simple Queries From a Single Table
• Select Award_Title from
Awards where (Award_Title
Like “Exploring*”) and
(Closed = False) Order By
Award_Date;
14
Simple Queries from Multiple Tables
• Set up relationships
(Access may make you do this and if it does, will help you with
a wizard)
15
Simple Queries from Multiple Tables
• SELECT
PIs.[First Name],
Awards.Award_Title,
Awards.Award_Date,
Awards.Closed
• FROM
PIs
INNER JOIN Awards
ON
PIs.ID = Awards.PI_ID;
16
Action Queries
• Queries can update, add or delete records
from a table
• DELETE * FROM Pis WHERE (PIs.[First Name])="No Research";
17
Forms
• Forms let you enter and display specific data
in a customized format.
18
Basic Types of Forms
• Single Record
• Datasheet
19
Form Controls
• Bound Controls
– Are directly ‘attached’ to the data and will update
as you leave the field on the form
• UnBound Controls
– Have to be manipulated with program code
• Calculated Controls
– Do not exist in the data tables. They are derived
based on other controls or fields in the database
20
Types of Controls
• Text Box: Displays and allows user to enter data
• Label: Displays static text
• Button: Does something by runnning macros or VBA Code
• Combo Box: A drop down list of values
• List Box: A list of values
• SubForm: a form of related data within a form
• Shapes: boxes, lines, images
• Check Boxes: Yes/No or True/False
• Option Groups: choose one option from a group
• Toggle Buttons: enabled or not enabled
• Tabs: for forms with lots of data, multiple tabbed pages
• Charts: Display data in graphical format
• More…
21
Properties
What can a Control look like and how can it act?
22
Events – Making Access Do Something
23
Visual Basic Code in a Form
• Behind a button
Private Sub btn_Close_Click()
DoCmd.Close acForm, frm_PI_Awards
End Sub
24
Data Validation and formatting
In the Table
25
Data Validation
On the Form
26
Macros
• Wizard driven tool to automate repetitive
tasks
• Can be very simple or very complex
27
Reports
• Reports display and print formatted data
– Text
• Form Letters, columnar reports, grouped reports
– Graphics
– Sub Reports
– Export to other formats, such as spreadsheet,
word processing
– Wizard driven or drive yourself
28
Designing a Report
29
Modules
• Modules contain Visual Basic for Applications
program code as subroutines or functions
• Visible from anywhere in the Application:
– tables, queries, forms, macros and reports
• Subroutines typically do something
• Functions do something and return a result
30
VBA Code
• Wizard and context assistants help write code
• Almost, but not quite understandable
Public Function Activate_Detail_Form(My_Form As Form)
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb()
Set rec = db.OpenRecordset("tbl_sys_Color_Scheme", dbOpenSnapshot)
rec.MoveFirst
My_Form.FormHeader.BackColor = rec!Detail_Header_BackGround_Color
My_Form.Label1.ForeColor = rec!Detail_Header_Font_Color
rec.Close
Set rec = Nothing
Set db = Nothing
My_Form.Repaint
End Function
31
Getting Started with Access
• Database development is quite unlike most other
programs used to create information in a computer,
such as word processing or spreadsheet.
• Database development requires prior knowledge
• A beginning user opening Access for the first time
likely has no idea where to start. Unlike Word or
Excel, you can’t just ‘start typing’
32
Create Ribbon
• Starting point for all new objects in the
database
33
Conventions
• Application developers like to label objects in their
applications in such a manner that when they go back to look
at it several years later, they can figure out what they’ve done.
• We use prefixes and suffixes when we name things:
– Tables: tbl_Awards
– Forms: frm_Awards
– Buttons on forms: btn_Form_Close
– Reports: rpt_Reports
– Text fields within a table: PI_Name_txt
– Integer Fields within a table: Award_Number_txt
• Spaces in object names are allowed, but dangerous.
Use underscores “_” or enclose object names in brackets
[tbl Awards] 34
Educational Materials
• Office.microsoft.com
– Templates  Databases
• My favorite Book:
– Microsoft Access 2010 Bible
• By Michael Groh
• Search Engine: [Access 2010 and your question]
35
36

Más contenido relacionado

La actualidad más candente

Quickstart Microsoft access 2013
Quickstart Microsoft access 2013Quickstart Microsoft access 2013
Quickstart Microsoft access 2013
comatsg
 
Introduction to microsoft access
Introduction to microsoft accessIntroduction to microsoft access
Introduction to microsoft access
Hardik Patel
 
Ms access tutorial
Ms access tutorialMs access tutorial
Ms access tutorial
minga48
 

La actualidad más candente (20)

Ms access
Ms accessMs access
Ms access
 
001.general
001.general001.general
001.general
 
Intro to Microsoft Access
Intro to Microsoft AccessIntro to Microsoft Access
Intro to Microsoft Access
 
Ms access 1
Ms access 1Ms access 1
Ms access 1
 
Msaccess
MsaccessMsaccess
Msaccess
 
Ms access
Ms accessMs access
Ms access
 
Ms access
Ms accessMs access
Ms access
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
 
Ms access 2007
Ms access 2007Ms access 2007
Ms access 2007
 
Ms Access
Ms AccessMs Access
Ms Access
 
Ms access
Ms accessMs access
Ms access
 
Quickstart Microsoft access 2013
Quickstart Microsoft access 2013Quickstart Microsoft access 2013
Quickstart Microsoft access 2013
 
Introduction to microsoft access
Introduction to microsoft accessIntroduction to microsoft access
Introduction to microsoft access
 
Introduction - Database (MS Access)
Introduction - Database (MS Access)Introduction - Database (MS Access)
Introduction - Database (MS Access)
 
Uses of MS Access in Business
Uses of MS Access in BusinessUses of MS Access in Business
Uses of MS Access in Business
 
Starting ms access 2010
Starting ms access 2010Starting ms access 2010
Starting ms access 2010
 
MS Access Training
MS Access TrainingMS Access Training
MS Access Training
 
Database
DatabaseDatabase
Database
 
Ms access tutorial
Ms access tutorialMs access tutorial
Ms access tutorial
 
Info Path 2007 Training
Info Path 2007 TrainingInfo Path 2007 Training
Info Path 2007 Training
 

Similar a MS ACCESS

Operate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptxOperate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptx
AbdirisakIman
 
01-Database Administration and Management.pdf
01-Database Administration and Management.pdf01-Database Administration and Management.pdf
01-Database Administration and Management.pdf
TOUSEEQHAIDER14
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
AxmedMaxamuud6
 

Similar a MS ACCESS (20)

MS ACCESS.pptx
MS ACCESS.pptxMS ACCESS.pptx
MS ACCESS.pptx
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
MS Access.pptx
MS Access.pptxMS Access.pptx
MS Access.pptx
 
MS-ACCESS.pptx
MS-ACCESS.pptxMS-ACCESS.pptx
MS-ACCESS.pptx
 
Database
DatabaseDatabase
Database
 
Skill Development 2.pptx
Skill Development 2.pptxSkill Development 2.pptx
Skill Development 2.pptx
 
Access
AccessAccess
Access
 
Operate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptxOperate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptx
 
RowanDay4.pptx
RowanDay4.pptxRowanDay4.pptx
RowanDay4.pptx
 
Related Worksheets
Related WorksheetsRelated Worksheets
Related Worksheets
 
MS Access Intro
MS Access IntroMS Access Intro
MS Access Intro
 
Ms access
Ms accessMs access
Ms access
 
Database management system
Database management systemDatabase management system
Database management system
 
Database part1-
Database part1-Database part1-
Database part1-
 
01-Database Administration and Management.pdf
01-Database Administration and Management.pdf01-Database Administration and Management.pdf
01-Database Administration and Management.pdf
 
Access 01
Access 01Access 01
Access 01
 
Chapter 9 Microsoft Access Database.pptx
Chapter 9 Microsoft Access Database.pptxChapter 9 Microsoft Access Database.pptx
Chapter 9 Microsoft Access Database.pptx
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
 
Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project Management
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

MS ACCESS

  • 1. Introduction to MS Access Steve Shapiro Computer Services Manager Office of Research Services and Administration University of Oregon Region VI/VII NCURA Conference April, 2011 1
  • 2. What is a Database? • a comprehensive collection of related data organized for convenient access, generally in a computer dictionary.reference.com/browse/database • This definition was found via a search of Google’s database • Databases are all around us, and all of us interact with them on a daily basis. • Who said you can’t make your own? 2
  • 3. Where does MS Access fit? • http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems lists history for about 50 database programs • Popular Databases: Oracle, Microsoft SQL Server, IBM DB2, FileMaker, Ingres, MySQL, Corel Paradox, Dbase III, R:Base • MS Access is a low-end to mid-tier database application – It runs independently on workstations for single users – It runs on servers that can be accessed by multiple users at the same time on a network – It provides a user friendlier front end to more powerful database applications such as Oracle and MS SQL Server 3
  • 4. What is MS Access? • MS Access is a relational database, meaning that data is stored in multiple tables that are related to each other. – PI’s in one table, their awards in another table. The database maintains a connection between the tables using something called a ‘key’ – a number that is the same in both tables. 4
  • 5. History • Access is one of the few products originally developed by Microsoft • Development began in the mid 1980’s • Combined with other databases that Microsoft licensed such as R:Base and FoxPro • Released in November 1992 as a single user application for very small (<10mb) files • Became dominant database for windows when competitors failed to transition to Windows successfully. • Now a very stable and robust application, scaling from 1 to many users and up to 2g of data in each file 5
  • 6. Today’s Session • Will cover < 1% of MS Access capability • We won’t talk about – Security – Advanced anything • Forms, queries, front/back ends, modules, macros – Interfacing with other databases – Advanced Data Validation – Questions on these and other topics are welcome! 6
  • 8. Keys relate information in different tables 8
  • 9. 5 Major Components of Access Access Database Objects • Tables • Queries • Forms • Macros • Modules 9
  • 10. Tables Tables hold the information, called data 10
  • 11. Tables - Data Types • Text Use for text or combinations of text and numbers, such as addresses, or for numbers that do not require calculations, such as phone numbers or postal codes (255 characters) • Memo Use for lengthy text and numbers, such as notes. Stores up to 63,999 characters • Number Use for data to be included in mathematical calculations, except money • Date/Time Use for dates and times • Currency Use for currency values and to prevent rounding off during calculations. • AutoNumber Use for unique sequential that are automatically inserted with a new record • Yes/No Use for data that can be only one of two possible values, such as Yes/No, True/False, On/Off. • OLE Object Use for OLE objects (such as Microsoft Word documents, Microsoft Excel spreadsheets, pictures, sounds, • Hyperlink Use for hyperlinks (hyperlink: Colored and underlined text or a graphic that you click to go to a file, a location in a file, a Web page on the World Wide Web, or a Web page on an intranet. Stores up to 2048 characters. • Lookup Wizard Use to create a field that allows you to choose a value from another table or from a list of values using a combo box 11
  • 12. Table Encounter • The prospect of creating multiple tables almost always intimidates beginning database users. Most often, beginners will want to create one huge table that contains all of the information they need, similar to an Excel spreadsheet. • When thinking about which fields to add to a table, a good first guess is: What piece of information will only occur once? – Such as • A person will probably only have one first name, though it may change – First_Name is a good candidate for the “PI” table • A table needs at least on field that never duplicates in the same table – Two or more people can have the same first, last and middle names • A person may have more than one award (per name) – The award title is not a good candidate for the PI table, since we don’t know how many awards a person may have 12
  • 13. Queries • Queries select and modify specific data • “Queries convert data to information” • They are used to populate forms and reports • MS Access uses a visual query wizard to help novice (and advanced!) users construct queries 13
  • 14. Simple Queries From a Single Table • Select Award_Title from Awards where (Award_Title Like “Exploring*”) and (Closed = False) Order By Award_Date; 14
  • 15. Simple Queries from Multiple Tables • Set up relationships (Access may make you do this and if it does, will help you with a wizard) 15
  • 16. Simple Queries from Multiple Tables • SELECT PIs.[First Name], Awards.Award_Title, Awards.Award_Date, Awards.Closed • FROM PIs INNER JOIN Awards ON PIs.ID = Awards.PI_ID; 16
  • 17. Action Queries • Queries can update, add or delete records from a table • DELETE * FROM Pis WHERE (PIs.[First Name])="No Research"; 17
  • 18. Forms • Forms let you enter and display specific data in a customized format. 18
  • 19. Basic Types of Forms • Single Record • Datasheet 19
  • 20. Form Controls • Bound Controls – Are directly ‘attached’ to the data and will update as you leave the field on the form • UnBound Controls – Have to be manipulated with program code • Calculated Controls – Do not exist in the data tables. They are derived based on other controls or fields in the database 20
  • 21. Types of Controls • Text Box: Displays and allows user to enter data • Label: Displays static text • Button: Does something by runnning macros or VBA Code • Combo Box: A drop down list of values • List Box: A list of values • SubForm: a form of related data within a form • Shapes: boxes, lines, images • Check Boxes: Yes/No or True/False • Option Groups: choose one option from a group • Toggle Buttons: enabled or not enabled • Tabs: for forms with lots of data, multiple tabbed pages • Charts: Display data in graphical format • More… 21
  • 22. Properties What can a Control look like and how can it act? 22
  • 23. Events – Making Access Do Something 23
  • 24. Visual Basic Code in a Form • Behind a button Private Sub btn_Close_Click() DoCmd.Close acForm, frm_PI_Awards End Sub 24
  • 25. Data Validation and formatting In the Table 25
  • 27. Macros • Wizard driven tool to automate repetitive tasks • Can be very simple or very complex 27
  • 28. Reports • Reports display and print formatted data – Text • Form Letters, columnar reports, grouped reports – Graphics – Sub Reports – Export to other formats, such as spreadsheet, word processing – Wizard driven or drive yourself 28
  • 30. Modules • Modules contain Visual Basic for Applications program code as subroutines or functions • Visible from anywhere in the Application: – tables, queries, forms, macros and reports • Subroutines typically do something • Functions do something and return a result 30
  • 31. VBA Code • Wizard and context assistants help write code • Almost, but not quite understandable Public Function Activate_Detail_Form(My_Form As Form) Dim db As Database Dim rec As Recordset Set db = CurrentDb() Set rec = db.OpenRecordset("tbl_sys_Color_Scheme", dbOpenSnapshot) rec.MoveFirst My_Form.FormHeader.BackColor = rec!Detail_Header_BackGround_Color My_Form.Label1.ForeColor = rec!Detail_Header_Font_Color rec.Close Set rec = Nothing Set db = Nothing My_Form.Repaint End Function 31
  • 32. Getting Started with Access • Database development is quite unlike most other programs used to create information in a computer, such as word processing or spreadsheet. • Database development requires prior knowledge • A beginning user opening Access for the first time likely has no idea where to start. Unlike Word or Excel, you can’t just ‘start typing’ 32
  • 33. Create Ribbon • Starting point for all new objects in the database 33
  • 34. Conventions • Application developers like to label objects in their applications in such a manner that when they go back to look at it several years later, they can figure out what they’ve done. • We use prefixes and suffixes when we name things: – Tables: tbl_Awards – Forms: frm_Awards – Buttons on forms: btn_Form_Close – Reports: rpt_Reports – Text fields within a table: PI_Name_txt – Integer Fields within a table: Award_Number_txt • Spaces in object names are allowed, but dangerous. Use underscores “_” or enclose object names in brackets [tbl Awards] 34
  • 35. Educational Materials • Office.microsoft.com – Templates  Databases • My favorite Book: – Microsoft Access 2010 Bible • By Michael Groh • Search Engine: [Access 2010 and your question] 35
  • 36. 36

Notas del editor

  1. A front end means the forms and reports that make the data in the database visible to users. Google’s screen is a an example of a front end.
  2. There are many ways to accomplish similar tasks within Access. The one you choose will depend on your ability. There is often not one right way.
  3. The table view
  4. If you want to do something in many places, the code will go into a Module. Example: extract the name of the current logged on user and use it to populate a form.