
Access XP Basics Presented by Traci Terrill [email protected] ESC Region XV Table of Contents Access XP .................................................................................................3 Getting Started with Access......................................................................4 Creating a new Database...........................................................................5 Tables........................................................................................................6 Creating Fields in a Table.........................................................................7 Building a Table in Design View..............................................................8 Create a Table by using Wizard................................................................9 Creating a Form ........................................................................................13 Using the Design Mode with Forms .........................................................15 Entering Records into Forms ....................................................................16 Viewing Records in Datasheet View ........................................................17 Formatting the Datasheet View ................................................................17 Printing Records........................................................................................17 Filtering.....................................................................................................18 Using Saved Filters...................................................................................19 Advanced Filtering ...................................................................................19 Modifying a Table and Updating a Form .................................................20 Saving and Modifying Records ................................................................21 Defining Relationships..............................................................................22 Using Subdatasheets .................................................................................23 Using Select Queries.................................................................................24 Modifying and Deleting a Select Query ...................................................26 Saving Select Query Results.....................................................................27 Range Queries...........................................................................................27 Select Queries involving “And”................................................................28 Select Queries involving “Or” ..................................................................28 Query Criteria Wildcards..........................................................................28 Creating a Report ......................................................................................29 Access XP Basics 2 Access XP – A Relational Database An Access database can be used to generate forms, queries, and reports from the data it stores. What is a relational database? A relational database stores data in one or more tables, which relate to each other through common values. An example would be to have a table with all student personal information: name, address, phone, parent name, social security, etc. Then have another table with student name and locker number, network login, etc. Certain data about the student can be pulled from both tables while leaving the data you don’t need behind. Both tables have the student name which is the common value between both tables. Basic Design of an Access Database Tables – store info Queries – ask questions, filter Forms – enter info, edit Reports – print info (calculations) A database should be created based on a design. Designing a database is a three step process: 1. Determine what information should be stored. 2. Divide information into named tables. 3. Define the fields and determine the primary key for each table. This handout will guide you through the very basic creation of an Access database. Access XP Basics 3 Getting Started with Access Click on Start, Programs, Microsoft Office, and then Microsoft Access to open the application. Use the Task Pane on the right side of the window to begin a new database. Click on New File task pane, click on Blank Database. Access XP Basics 4 Creating a New Database Click on Blank Database under the New section on the Task Pane. The first requirement of starting a database is to assign it a file name and save it. Save this database as Student Data and select Create. Access XP Basics 5 Tables A table is a collection of data about a specific topic, such as students, teachers, supplies, or products. A table is made up of fields that describe the content in the table. Each row is called a record. Records are multiple entries of a field. Each student’s data would be considered a record. Student Name or phone number would be a field. There are three types of methods to creating a table, design view, using a wizard, and creating by entering data. Primary Key – each table must have a primary key. This means that each record must have a unique value. An example of this would be social security number, network password, or student ID. A primary key is what makes the databases relational. A value in one table must have a relationship to value in another table. Access XP Basics 6 Creating Fields in a Table A data base is organized into fields that store data. A field is defined by its name, type, size and format. Field Name Guidelines: • Make field names unique. • Choose the shortest possible name that accurately describes the contents of the field. • Use compete words instead of numbers and abbreviations. • Avoid special characters. Consider the type of information you are going to put into your table. Determine an appropriate field name for each criterion. For example, student name could be a field name, but if you ever wanted to filter for last name only you would not be able to. Create a separate field name for first and last name. To make it easier to decipher between the types of data in the field name it is suggested you put a three letter description of the data type in the field name. For example, txtFirstName or dteBirthday. This is only a suggestion and is not mandatory. 3 Letter Data Type Description Description Text or a combination of text and numbers Text txt without any calculations Long text or a combinations of text and Memo mem numbers Number Numbers to be used in calculations num Date/time Date and time dte Monetary values and numeric data used in Currency cur calculations Yes/no Can only contain a yes or no yen Brainstorm the types of information you need to know about a student, list your ideas here. Examples are listed to get you started: First Name Last Name Home Address Home Phone Access XP Basics 7 Building a Table in Design View Double click on Create table in Design view The Design view is where the table is created. Each element of information must have a field name, be assigned a field type, and include a description for easy reference. Use the previous data to group the information into tables. Start building your first table. Set Student ID as the primary key. Right click on the row and choose Primary Key from the menu. Save your table as tblStudentContact. If you did not set a primary key this is the message you would see when you save your table. Access will put in an AutoNumber to hold the place for the Primary Key. Access XP Basics 8 Create a Table by using Wizard Double click on Create table by using wizard. Determine what kind of table category best fits your needs, either business or personal. Each has a wide variety of sample tables to select. Select a sample field and click on the > or click on the >> to move all the samples fields over from a particular table. Use the < or << to move any samples fields you do not need. Select Personal, then Books under the Sample Table. Move Title, ISBNNumber, CopyrightYear, PublisherName, PurchasePrice, DatePurchased, and Book ID. Highlight BookID and select Rename Field. Rename to StudentID. Click on Next. Access XP Basics 9 Wizard Continued… Assign the table the name tblStudentBooks Decide if you want Access to set the primary key or if you want to set the primary key. If you set it, select the field that will be unique for each record. In this case, select StudentID. For this example, select No, I’ll set the primary key. Select Next. Also decide what kind of data will make up the primary key: a number automatically assigned, a number you enter, or a number/letter combination you enter. For this example select the last option, Number and/or letters I enter when I add new records. Access XP Basics 10 Wizard Cont… If there were other tables in you database the Wizard would want to know if relationships needed to be created for you. Click on the Relationships button to see the below window. We will set up the relationships between the tables, select Next to continue to the final window. Select the second option to enter the data directly into the table and choose Finish to complete the wizard. Access XP Basics 11 Wizard Continued… The last window, select Enter data directly into the table. Start entering data into the table. Access XP Basics 12 Access XP Basics 13 Creating a Form A form is a window that contains the fields of the table and is used for entering data and viewing records. A form displays only one record at a time, making data entry less error prone. Select Form from the list
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages31 Page
-
File Size-