130 likes | 270 Views
Forms & Reports. William Klingelsmith. JOIN Types on Relationships. There will be instances in your queries where you will want results from a table even if they have no corresponding entries in another table.
E N D
Forms & Reports William Klingelsmith
JOIN Types on Relationships • There will be instances in your queries where you will want results from a table even if they have no corresponding entries in another table. • By manipulating the JOIN types on the relationships in your queries, you can achieve this goal.
JOIN Types on Relationships • Create a query to count the number of each albums for each genre in the music database. • What do you notice about the number of results from the query and the number of genres actually defined in the Genre table?
JOIN Types on Relationships • Option 2 will create a LEFT JOIN • Will force all entries from the left table to appear • Option 3 will create a RIGHT JOIN • Will force all entries from the right table to appear Left table Right table
JOIN Types on Relationships • Run the query again and take note of the number of results
Form Creation • Forms provide a more natural way to enter/view records in your database • Forms can be created in various ways • Form Wizard will be sufficient for our needs
Form Creation • Let’s create a form to aide in data entry for the Albums table • Create Tab -> Form Wizard
Form Creation • Tables/Queries defines the data source for the form • When creating a form for data entry, it is a good idea to include all fields
Form Creation • Let’s now add a new album to our database using our form • Click the New Record button at the bottom of your form and enter this information • Genre: Indie Rock • Release Date: Today • Album Name: SeaessOneohone
Form Creation • Forms, like tables and queries, have different views • Layout view allows you to reposition elements within your form • Design view lets you modify and add complex form controls, change themes, and modify other visual characteristics.
Form Creation • Forms can be created for multiple data sources • Let’s create a form to perform data entry for both the Genre and Albums tables • From the Genre table, add Genre Name and Description • Add all fields from the Albums table • View form by Genre • Forms of this type are known as “One-To-Many forms” or “Mainform/Subform configuration”
Reports • Reports are created in a very similar manner to forms, but are primarily used for outputting information in a logical manner