350 likes | 422 Views
Form and Report. Midterm exam. Friday, October 31, 2008 Content: Week 1 to Week 8 Format: Matching Multiple choice questions Database problem solving questions (SQL). Create forms with more than one table. Create forms with more than one table. Create forms with more than one table.
E N D
Midterm exam • Friday, October 31, 2008 • Content: Week 1 to Week 8 • Format: • Matching • Multiple choice questions • Database problem solving questions (SQL)
Create a form to view specific records Create -> Form Design
Create a form to view specific record Private Sub Command3_Click() Dim stDocName As String Dim stLinkCriteria As String stDocName = "ViewEmployee" stLinkCriteria = "[Name]=" & "'" & Me![Name] & "'" DoCmd.OpenFormstDocName, , , stLinkCriteria End Sub Form Name Text box Name Field Name
Using wildcats * and ? • View a form in Design View
Using wildcats * and ? Private Sub Command3_Click() Dim stDocName As String Dim stLinkCriteria As String stDocName = "ViewEmployee" stLinkCriteria = "[Name] LIKE" & "'" & Me![Name] & "'" DoCmd.OpenFormstDocName, , , stLinkCriteria End Sub
Why do we need reports? • Final product of most database applications is report • Reports combine information from tables, queries, and forms • Support paperless office
Forms and reports • Differences: • Reports are intended for printing while forms are intended for viewing/interacting with users • Underlying data can’t be changed • No Datasheet view in report • Number of columns, width..etc are controlled by Printer Setup
Reports in Access • Group/totals report • Tabular reports • Others: Single-column report, Multi-column report, Mailing label, unbound report
Creating a report using Report Wizard Create -> Report Wizard