1 / 32

Introduction to Access 2010

Introduction to Access 2010. CIS120first.accdb is the database I am creating. I want you to use a different layout to design the table in the database. I clicked on View and got prompted to name the table. The first field is idno and I made the datatype text and the field

jstacy
Download Presentation

Introduction to Access 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. I want you to use a different layout to design the table in the database.

  3. I clicked on View and got prompted to name the table.

  4. The first field is idno and I made the datatype text and the field size 5.

  5. The second field is the empname and I made it text and changed the field size to 40.

  6. The third field on the record is named jobcode and it is a text field that has a field size of 2 because the code is only 2 characters.

  7. I have set up a forth field called numdep which I am going to make numeric and an integer. This shows the Data Type choices.

  8. Once I pick Data type of Number I can chose a type depending on the numbers I want. I will use integer.

  9. Now click on view and you can populating the table with data. For decimal numbers I use single for small decimals and double for large decimals like salary.

  10. I have populated the table with data.

  11. Now I click on Create. Next I click on Query Design. A query lets you specify fields and conditions that you want to use to access the table. It will return records that meet the query criteria.

  12. Next I select the table by clicking on Add.

  13. Now you see the fields in the table so you can select fields to use in your query.

  14. Click on datasheet view to see results. 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 in the criteria line under the jobcode. IT is in quotes because it is a string or non-numeric literal.

  15. Logic for query checking For jobcode = IT Jobcode = IT N Y Display

  16. Click on the design icon to go back to design.

  17. I named the query ITemp.

  18. The query has been saved

  19. Creating another Query.

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

  21. I have now got two conditions in an AND relationship. The two conditions are put on the criteria line and both must be true for the record to be displayed.

  22. LOGIC for two things in an AND relationship Jobcode = IT Y N Salary < 60000 N Y Display

  23. The results

  24. In this example, the criteria is that numdep is > 3 OR salary is > 55000. Since these are in an OR relationship, one criteria goes on the criteria line and the other criteria goes on the or line.

  25. Logic for two criteria in an OR relationship. numdep > 3 N Y salary > 55000 Display Y N Display

  26. 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.

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

  28. Jobcode has to be IT and then either numdep has to be > 3 OR salary has to be > 55000. Jobcode = IT N Y numdep > 3 N Y salary > 55000 Display Y N Display

  29. 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.

More Related