Entering Data in One of the Independent Entity Tables and the Associative Entity Table of a M:M Relationship* If you came to this presentation via a web.

Slides:



Advertisements
Similar presentations
Course Form In the main window (cf. Figure 2), click on Forms, then double-click on Create form by using wizard. Follow the sequence of actions below.
Advertisements

Importing Data from a Spreadsheet that contains Phone Numbers, ZIP Codes and other similar string data that looks like a number If you came to this presentation.
Introduction to Microsoft Access
AS ICT Building MS-Access Databases. Creating a Combo Box Drop Down List 1.When creating a Field requiring a Drop Down list in a Table, select the Lookup.
Copyright © 2008 Pearson Prentice Hall. All rights reserved Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Access.
Benchmark Series Microsoft Access 2010 Level 1
Entering Data in Tables in a Supertype/Subtype Relationship*
Microsoft Word 2010 Lesson 1: Introduction to Word.
LSP 121 Access Forms, Reports, and Switchboard. Access Forms.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Mark Dixon Page 1 05 – Database Design: Sub-forms.
Chapter 1 Databases and Database Objects: An Introduction
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
LSP 121 Access Forms, Reports, and Switchboard. Overview You’ve learned several of the basic nuts-and-bolts of creating a database, entering data, and.
ISP 121 Week 3 Access Forms and Reports. Displaying Data – The Form One way to start a form is to use the Form Wizard What table or query are you creating.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
Multi-Table Forms Access – Lesson 5.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 4 Reports, Forms, and Combo Boxes.
Creating an ERD in SQL Server If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or.
Chapter 3 Maintaining a Database
Tutorial 6 Using Form Tools and Creating Custom Forms
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
Advanced Forms Lesson 10.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Creating a New Database If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or press.
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Database Applications – Microsoft Access Lesson 6A Designing Custom Forms Updated F13 24 slides in presentation 1.
ACCESS Part 2. OBJECTIVES  Use the Form Wizard  Create a split form  Use Form Layout View  Add fields to a form  Modify form controls  Create calculations.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
XP 1 Microsoft Access 2003 Introduction To Microsoft Access 2003.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
Importing Data from a Spreadsheet If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 7 – Creating and Using Templates in a Web.
Database Applications – Microsoft Access Lesson 7 Designing Custom Reports Updated 11/13 27 Slides in Presentation.
) Main Menu: You can access all aspects of the database from this screen 2) Contacts: You can access the “contact database management” side of.
Creating an Access Project* If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or.
CS 281 – Fall 2015 Lab 4 Parametric Query and Forms in MS Access.
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.
Chapter 3 Automating Your Work. It is frustrating when you have to type the same passage of text repeatedly. For example your name and address. Word includes.
The Excel model for information processing The Excel model is a grid of cells in which items of information are stored and processed. Any information that.
Importing Data from a Spreadsheet If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse.
Importing Data from a Spreadsheet that contains Phone Numbers, ZIP Codes and other similar string data that looks like a number If you came to this presentation.
Creating a New Database If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or press.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
Web Site Development - Process of planning and creating a website.
1 Research Papers Database. 2 Form – Add – Delete – Change … information in the database.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
Homework 2 Hints. General Tips Remember what FORM view you are in! – Design, form, and layout view TABLE views include: – Design and Datasheet view.
Creating Functions If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or press space.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
Creating an ERD in SQL Server
Microsoft Access 2007 – Level 2
Developing Forms and Subforms.
Microsoft Official Academic Course, Microsoft Access 2013
Prepare data for importing
Forms.
Creating a New Database
Enhancing Forms with OLE Fields, Hyperlinks, and Subforms
Database Applications – Microsoft Access
Microsoft Office Access 2003
Microsoft Office Access 2003
Presentation transcript:

Entering Data in One of the Independent Entity Tables and the Associative Entity Table of a M:M Relationship* If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or press space bar to continue. This presentation was prepared by Professor Steve Ross, with the advice of other MIS Faculty, for use in MIS Classes at Western Washington University. Please contact Dr. Ross for permission to use in other settings..Dr. Ross

The Goal : Edit Buildings and Assignments to the Buildings

tblAssignment BuildingID WorkerID StartDate tblBuilding BuildingID Address City State Zip Description Status ManagerID BuildingType tblWorker WorkerID LastName FirstName MidName AnnualPayIn1000 RankID SupervisorID DepartmentID MailCode The Challenge The data comes from two different tables –tblBuilding –tblAssignment –You cannot edit data from two tables on the same form.

tblAssignment BuildingID WorkerID StartDate tblBuilding BuildingID Address City State Zip Description Status ManagerID BuildingType tblWorker WorkerID LastName FirstName MidName AnnualPayIn1000 RankID SupervisorID DepartmentID MailCode The Solution In a 1:M relationship, represent … –the 1-side as the main form –The M-side as the subform Record Source for the main form Record Source for the subform

Step 1 – Source Data The standard for this course is to use a view as the Record Source of each form. For any form that enables the user to edit data, the view must be based on a single table only. Therefore Step 1 is to create a view for each form. –vueFrmBuilding and vueSfrAssignment contain all fields of their respective tables

Step 1a – Source Data Determine how each field from vueFrmBuilding will appear on the “1-side” form. (Note: “controls” are objects on the form, such as labels, textboxes, buttons and combo boxes.) FieldEditableControl format Constraints BuildingIDNoRead only text AddressYesText box CityYesText box StateYesText box ZipYesText box DescriptionYesText box StatusYesText box ManagerIDYesCombo box FK to tblWorker BuildingTypeYesText box

Step 1b – Source Data Do the same for vueSfrAssignment – the “M-side” view *The foreign key in the subform, vueSfrAssignment.BuildingID, always matches the value of the parent form linking field (vueFrmBuilding.BuildingID) on the main form. Therefore, an editable or visible control is not needed on the subform for the FK field. FieldEditableControl formatConstraints BuildingIDNoNo control needed*FK to tblBuilding WorkerIDYesComboFK to tblWorker StartDateYesText box

Just one more slight complication: tblAssignment does not contain any Worker Names, it contains WorkerIDs. How do we show names instead? 15 37

The Complication : the Worker is a number (WorkerID) in the tblAssignment The Solution: Use a combo box to look up and show the Worker Name corresponding to the WorkerID

Standard Form Heading Step 2 – Layout Create a draft view of the form, giving approximate placement and type of controls for each data item I usually do this by hand, not in a graphic program such as this BuildingID (read only, no label) Address: City: State: Zip: Description: Status: Manager: Person list combo box Address City Description Status State Zip Assignments Person Start Date These will be text boxes bound to the relevant fields Person list combo box StartDate These will be combo boxes, bound to the relevant fields but displaying data from the related tables

Step 3a – Create Version 1 of the Main Form Create the main form –Use the “1-side” view created in Step 1 (vueFrmBuilding) as the record source –Add all desired fields to the form

Step 3b – Add the Subform There are multiple ways to create a subform. 1.From Scratch Build and save a form to use as the subform. Drag the subform from the Forms object window into the Details area of the main form Set …. –The Link Master Fields and –The Link Child Fields … to the appropriate PK and FK (e.g. BuildingID)

Step 3b – Add the Subform 2.With the subform button and wizard Use the “M-side” view as the record source Notice that the PK and FK fields are the link between the main form and the subform. –“Parent” or “Master” (PK) field on the left –“Child” (FK) field on the right

Step 3b – About the Subform Control Illustrated below is … A subform (It’s everything inside the orange box) A subform control (It is the orange box) –The subform control manages the link between the main form and the subform

Step 3b – About the Subform Control The Subform Control is selected (orange box) The Subform is selected (notice the black dot)

Step 3b – About the Subform Control The Data properties tab shows … the Link Master Fields and the Link Child Fields The linkage is good The linkage is broken

Step 3c – Subform Layout Normally, you will have to do additional formatting of the subform.

Step 3c – Subform Layout Set the subform Default View to Continuous Forms.

Step 3c – Layout Comparison Side-by-side ComparisonEfficientWasteful NeatMessy Data View

Step 3c – Layout Comparison Side-by-side ComparisonEfficientWasteful NeatMessy Data View

Step 4a – Fine Tuning, Main Form Convert text boxes to combo boxes or other controls as necessary* * See this presentation for discussion of technique.this presentation

Step 4b – Fine Tuning, Subform Open the subform in design view Convert text boxes to combo boxes or other controls as necessary Change the Default View to Continuous Forms –Set Dividing Lines and Record Selectors to “yes” Important settings

Step 4c – Finish the Forms Apply check constraints and other properties to controls. Once controls are set, apply other design standards.* * The form illustrated met all MIS 421 design standards when it was created. Subsequent changes to the standards may have occurred.

Trouble Shooting Common Problems Do all the records from the M-side table show in the subform … no matter what record is on the main form? See “Broken Linkage” slide below. Does the Combo Box for a FK field look like it is set up correctly, but you still cannot enter or change the Combo Box entry? See “Too Many Tables in Your View” slide below.

Trouble Shooting Broken Linage Sometimes the linkage is broken. Building 1 actually has only two assignments, but all assignments are appearing on the subform.

Trouble Shooting Too Many Tables in Your View Sometimes the Combo Box does not allow you to change the value in the Combo Box – even though the Combo Box appears to be set up correctly. –The most likely cause is that the view for the Form or the view for the Subform is based on more than one table. There should be just one table supporting the Main Form and one supporting the Subform. Delete unneeded tables from the view.

The Chicken or the Egg You are asked to enter this new information. –New Building: Address 123 Cherry Lane City: Demingway State: WA ZIP: –New Worker: Name: Joe Blaineless –New Assignment: Joe is assigned to the new Demingway building on Jan 1, 20xx Which data requires an additional form? Which data must be entered first? Last?

Step 5 – Quality Assurance Can the user change data in an existing record –in the “1-side” view? –in the “M-side” view? Can the user enter new records –in the “1-side” view? –in the “M-side” view? Are all constraints working properly? (Test the limits.) Have all Design Standards been met?