introduction to access 2010 cis120first.accdb is the database i am creating

32
Introduction to Access 2010 CIS120first.accdb is the database I am creating.

Upload: rudolf-watson

Post on 04-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Introduction to Access 2010

CIS120first.accdb is thedatabase I am creating.

Page 2: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I want you to usea differentlayout to designthe table inthe database.

Page 3: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I clickedon Viewand gotpromptedto namethe table.

Page 4: Introduction to Access 2010 CIS120first.accdb is the database I am creating
Page 5: Introduction to Access 2010 CIS120first.accdb is the database I am creating
Page 6: Introduction to Access 2010 CIS120first.accdb is the database I am creating

The first fieldis idno andI made thedatatype textand the fieldsize 5.

Page 7: Introduction to Access 2010 CIS120first.accdb is the database I am creating

The second fieldis the empnameand I made ittext and changed the field size to 40.

Page 8: Introduction to Access 2010 CIS120first.accdb is the database I am creating

The third field on therecord is named jobcode and it isa text field thathas a field size of2 because the code is only 2 characters.

Page 9: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I have set up a forth field callednumdep which I am going tomake numeric and an integer.

This shows the Data Type choices.

Page 10: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Once I pick Datatype of NumberI can chose a typedepending onthe numbers Iwant. I will useinteger.

Page 11: Introduction to Access 2010 CIS120first.accdb is the database I am creating

For decimal numbers I usesingle for smalldecimals anddouble for largedecimals likesalary.

Now click onview and you canpopulating thetable with data.

Page 12: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I have populatedthe table withdata.

Page 13: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Now I click on

Create.

Next I click on

Query Design.

A query lets you specify fields andconditions that you want to useto access the table. It will returnrecords that meet thequery criteria.

Page 14: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Next Iselectthe tableby clicking on Add.

Page 15: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Now you seethe fields inthe tableso you canselect fields to use in your query.

Page 16: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I brought down four of the fields by double clicking on them (you can also drag).I want to see all IT employees so I put IT inthe criteria line under the jobcode.

Click on datasheetview to seeresults.

IT is in quotes becauseit is a string or non-numericliteral.

Page 17: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Jobcode= IT

YN

Logic for query checking For jobcode = IT

Display

Page 18: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Click on thedesign iconto go backto design.

Page 19: Introduction to Access 2010 CIS120first.accdb is the database I am creating
Page 20: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I named the queryITemp.

Page 21: Introduction to Access 2010 CIS120first.accdb is the database I am creating

The query has been saved

Page 22: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Creating anotherQuery.

Page 23: Introduction to Access 2010 CIS120first.accdb is the database I am creating

You can also click on the arrow and choose the field.

Page 24: Introduction to Access 2010 CIS120first.accdb is the database I am creating

I have now got two conditions inan AND relationship. The twoconditions are put on the criteria lineand both must be true for therecord to be displayed.

Page 25: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Jobcode = IT

Salary < 60000

Display

Y

YN

N

LOGIC for two thingsin an AND relationship

Page 26: Introduction to Access 2010 CIS120first.accdb is the database I am creating

The results

Page 27: Introduction to Access 2010 CIS120first.accdb is the database I am creating

In this example, the criteria isthat numdep is > 3 ORsalary is > 55000. Since theseare in an OR relationship, onecriteria goes on the criteria lineand the other criteria goes on the or line.

Page 28: Introduction to Access 2010 CIS120first.accdb is the database I am creating

numdep > 3

salary > 55000

Display

Display

YN

YN

Logic for two criteriain an ORrelationship.

Page 29: Introduction to Access 2010 CIS120first.accdb is the database I am creating

The criteria is numdep > 3 OR salary > 55000. The first result has both true.The second result has just numdep > 3.The third result has just numdep > 3.The fourth result has just salary > 55000.

Page 30: Introduction to Access 2010 CIS120first.accdb is the database I am creating

In this query the jobcode has to be IT and then inaddition either the numdep has to be > 3 or the salaryhas to be > 55000.Since the IT has to be true it has to be on boththe criteria line and the or line.Essentially you now have jobcode IT and numdep > 3OR jobcode IT and salary > 55000.

Page 31: Introduction to Access 2010 CIS120first.accdb is the database I am creating

Jobcode = IT

numdep > 3

salary > 55000

Display

Display

YN

YN

YN

Jobcode has to be IT and theneither numdep has to be > 3 ORsalary has to be > 55000.

Page 32: Introduction to Access 2010 CIS120first.accdb is the database I am creating

All the records have a jobcode of IT.The first record is IT and both numdep> 3 and salary > 55000.The second one is IT and jobcode > 3.The third one is IT and salary > 55000.