Presentation is loading. Please wait.

Presentation is loading. Please wait.

Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.

Similar presentations


Presentation on theme: "Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add."— Presentation transcript:

1 Access Queries and Forms

2 Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add a field in “Design” view – so switch to Design view

3 Creating a New Field Change to Design View Click in the first blank cell in Field Name, and type the name of the new field.

4 Moving a Field  You can move a field in Datasheet view by clicking on the field you want to move once, then clicking again WITHOUT LETTING GO  A white rectangle will appear. Using your mouse, move the cursor to the place where you want the field to go. A thick black line will appear. If the line is where you want the field to go, then release it.

5 Moving a Field This is what the thick, black line looks like. If you release the mouse now, the “Cell Phone” field will be moved between Parents’ Names and “Home Address.”

6 Sorting Data  Just as in Excel, Access lets you sort data.  The Sort function is located in the “Sort and Filter” group on the home tab on the ribbon. Sort & Filter Group

7 Sorting  To sort in descending (Z to A, highest to lowest), (1) select the field you want to sort by, (2) go to the toolbar and click on ZA

8 Sorting  To sort in ascending (A to Z, lowest to highest), (1) select the field you want to sort by, (2) go to the toolbar and click on AZ

9 Sifting through Data  There are 3 ways to find a particular record in a database: find, filters and queries.  Find: use the find command to find a record  Filters: look through all the records and find the one that matches.  Queries: use a set of criteria (conditions) that eliminate many, if not all but one, of your records. You tell Access to find something for you; you ask it a question

10 Find Command Open the Table or form you want to search. Press the Find command on the right side of the toolbar.

11 Using Find Click in the field you want to search or select Table

12 Results of “find” Command

13 Filters  Filters scan a table for whatever data you need.  Filters look at every record and then hide the ones that don’t match.  You can only filter one table at a time

14 Using “Filter” Select “Filter” on the Ribbon.

15 Define your filter by selecting the box(es) you want

16 Using Filter Define how you want Access to filter your data. Check the answers you want; uncheck those you don’t want

17 Filtering by Date If you are filtering a Date field, Filter will automatically let you filter by dates before, after, or between Tell Access the date (equals) or the start and end date you want.

18 Using Filters  After you filter, you can toggle between your original table and your filtered results. Click here to toggle between table and filtered results.

19 Queries  Queries go beyond find and filters.  With queries, you can search one or more tables, one or more fields, and even save your results.

20 Creating a Query  Click on the “Create” tab on the ribbon Click on the “Create” tab.

21 Creating a Query  Then click on “Query Wizard.” Click on “Query Wizard”

22 Use Simple Query Wizard After you select “Query Wizard,”this dialog box appears. Select Simple Query Wizard. Press “OK” 2. Select “Simple Query Wizard” from the drop down menu 1. Select Query Wizard. 3. Click “OK”

23 Designing Queries Using Simple Query Wizard  When you click on Simple Query Wizard and “OK,” this dialog box appears:

24 Designing a Query In the dialog box, select each field that you want in your query. 1. Select the field or fields you want to search by in your query 2. Click on the single arrow to select that field.

25 Designing a Query  The fields you select will be entered in your query. Fields selected:

26 Designing a Query  When you have selected all the fields you want to include in your query, then click on “Next”

27 Designing a Query  Access will ask you what to name your Query. Type in a name for it

28 Designing a Query  After naming your query, select “Modify the query design” and then “Finish” 1. Select “Modify the query design” 2. Click “Finish”

29 Designing a Query After you click “Finish,” your screen looks like this: Each field you selected

30 Designing a Query 1.For each field, type the answer you want Access to look for (that is, the criteria it should search for.) 2. If you want a field to show, then make sure it is checked. If you want to specify a criteria, then type it in under “Criteria” The query will show the ID #, but doesn’t search for a specific # The query will search for a 2014 black car with a V-8 engine.

31 Running a Query  To start the search, click “Run” on the tool bar

32 Queries  You can also have a query that asks for records that are greater than or less than a value.

33 Queries  Select the field(s) you want to query.  Under Criteria, put “>” or “<“ and the value you want the query to use  For example “>50”  If you are using a Currency field, you do not type the $  Then click on “Run” to start the Query

34 Queries  Remember that the field you select will show in your query results only if “Show” is selected in your query. If Show is unselected, then these fields will be used in the query, but not shown in the result.

35 “Or” Queries  When you put criteria on the same line, the query is automatically and “AND” query – that is, the data must meet ALL the criteria on the line.  If you put data on more than one line, then Access will run an “OR” query – it only has to meet one or the other of the criteria This query will list the first and last names of students in either 10 th or 11 th grade.

36 Reports  You can create Reports from an object in a database by going to the “Create” tab on the ribbon,  Then click on “Report”

37 Access, continued Using Forms to Enter Data

38 Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  You can also use Access forms to make the job of entering data easier.

39 Entering Data in your Table using forms  Access forms are like paper forms  Use Access forms to gather data  Access forms are directly linked to the database tables that store the information collected.

40 Why use forms?  You do not need to scroll up and down to enter data  Focus on one record at a time  Easier to update / modify a form  You can have different forms for different people – so they see only the fields they need

41 Forms  When you type information on an Access form, the information is automatically entered in the table connected to that form.  You may need to click on “Refresh” to see your data in the table.

42 Forms Forms are made up of controls such as text boxes, buttons, document tabs, and drop-down lists, grouped in a way that makes them easy to use and helps you get work done.

43 Designing a form  Start by listing the data you need to enter  Imagine what a paper form would look like  Decide on the “controls” you need to capture and work with data. For example, if you need text, you’ll use a textbox. If you want to give users a list of choices, then you’ll use a list control.

44 Creating a form with AutoForm  In the Navigation Panel, select the table (or query) that has the data your new form should display  Click the Create tab on the ribbon  Go to the Forms tool, and select the AutoForm tool you want 1. Click here first

45 Types of AutoForms  Select Form – a simple form; displays one record at a time.

46 Types of Forms  Split Form – displays all records as a datasheet on half of the screen, and the currently selected record as the other half. This is useful if you want to browse and edit records.

47 Types of Forms Multiple Items – shows all records from the table/ query in a datasheet format

48 Creating a form  Enter data on the form. Be sure you are in “Form” view.  Save by clicking the Save button the toolbar  The Save As dialog box appears  Type a name for the form, and click ok (the default name is the same name as the table it’s linked to)

49 Use Navigation Tools To move among forms, use the navigation tools at the bottom of the form First form Last form New form


Download ppt "Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add."

Similar presentations


Ads by Google