Your SlideShare is downloading. ×
AIA101.3.Access Reports And Forms
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

AIA101.3.Access Reports And Forms

2,852
views

Published on

3rd module in Accelerated Introduction to Microsoft Access. Covers reports, sub reports, forms. subforms, unbound forms, expression builder, wizards and designers.

3rd module in Accelerated Introduction to Microsoft Access. Covers reports, sub reports, forms. subforms, unbound forms, expression builder, wizards and designers.

Published in: Technology

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,852
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Microsoft Access Module - Reports and Forms P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com [email_address]
  • 2. Module Outline
    • Part 1: Reports
    • Part 2: Forms
    Two parts:
  • 3. MS Access training Part 1 Creating Reports
  • 4. Module Hands On
      • Create a summary report
      • Format the report
      • Add a calculated field
      • Add summary fields
      • Add conditional formatting
      • Sub-reports (optional)
        • Create a sub-report
        • Create a master-detail report
    • Students “hands-on”:
  • 5. Creating reports
    • Two basic methods:
      • Report Wizard
      • Report Designer
    • Common approach is to start w/ the Wizard then modify the result
  • 6. Report Wizard
    • Building a Report by Using a Report Wizard
      • Use the Report tab of the database window
      • Can base report on table or query
      • Report Wizard - a series of dialog boxes that steps you through the process of building a report
  • 7.  
  • 8. Report Wizard
    • After selecting the table or query you give the Wizard additional information…
      • Grouping – for summaries, etc.
      • Sorting – for sort order within group, plus which summary function to use
      • Format and style
  • 9. Report Wizard
    • Create a labor report
      • Use qryLaborDetail query
      • Select wono, empno, fname, lname, hours
      • Group by wono
      • Use summary options: sum hours,
      • Layout and style to taste
      • Save as rptLabor
  • 10. Report Design Window
    • Menu Bar and Toolbar Rulers - vertical and horizontal
    • Report Layout
    • Toolbox
    • Field List Box - used for adding fields to a report template
    • Properties Sheet or Section Detail Sheet - controls the appearance of a report object
    • Scroll Bars
  • 11. Report Designer
  • 12. Redesigning a Report
    • Able to move field and title boxes around the design template via a drag operation
    • Able to resize the report bands using selection handles
    • Able to add additional titles using label control
    • Able to align text as well as change the font and size of type used
    • Can add background fill effects, etc.
  • 13. Report Designer
    • Open rptLabor in design view
      • Format headings
      • Remove extra subtotal row and reduce band height
      • Fill title with grey background
      • Etc.
      • Save with same name (rptLabor)
  • 14. Report Designer Results
  • 15. Report Designer
    • Adding Fields
      • Use toolbox, or
      • Drag and drop from field list
      • Set control source on property sheet if appropriate(see below)
      • Put SQL function around the control source for aggregate fields
    • Two types
      • Bound
      • Unbound (no control source)
  • 16. Report Designer Field List Function
  • 17. Report Designer
    • Open the report Labor in design view
      • Add a cost column (unbound control)
      • Format to taste
      • Save report as rptLaborCost
  • 18. Report Designer
    • One more change to Labor report
      • Add group and grand totals to labor cost for the report
      • Add an unbound textbox control
      • Use a formula, =sum(…), as the control source
      • Save as rptLaborCost_2
  • 19. Labor report with Cost Column
  • 20. Conditional Formatting
    • Format, Conditional Formatting commands from Menu Bar
    • Can be used for forms or reports
      • Examines the contents of a field
      • Based upon field’s contents able to specify:
        • Font/Font size/Font color
        • Background color
        • Text attributes (boldface, underline, italics)
    • Try flagging stdhrs >= 70
  • 21. Subreports
    • Can have sub reports added to a main report
      • to show detail
      • To add related information such as customer data on an invoice
    • First create the sub report
    • Then create the main report and drag the sub report and drop it in place, or
    • Use the subform/sub-report control
  • 22.  
  • 23. Sub Reports
    • Create a subreport named srptLaborDetail_3
      • Base on qryLaborDetail_3
      • Be sure to use tabular format
      • Eliminate extraneous title information
  • 24. Labor Sub Report
  • 25. Subreports
    • Make sure you have a permanent link between work_orders and qryLaborDetail_3
    • Create a main report rptWork_Orders_Main
      • Base on work_orders table
      • Expand the detail band and drag the subreport srptLaborDetail_3 into position
    • Format to taste
  • 26. Sub Reports
    • Drag new subreport to main report, or use sub/form subreport control
    • Save as rptWork_OrdersFull
  • 27. Full Work Orders Report Results
  • 28. Microsoft Access Training Part 2 Creating Forms
  • 29. Module Hands On
      • Build two simple data entry forms
      • Create an unbound form
      • Create a sub-form
      • Build a master-detail form from above forms
      • Add totals
    • Students “hands-on”:
  • 30. Forms
    • Form - provides for customized data entry instead of using the datasheet window
    • Also used to establish criteria for reports and queries
    • Found on the Forms tab of the database window
    • Form Wizards - a series of dialog boxes prompting you about your form requirements
  • 31. Form Wizard
    • Specify source table or query, fields, etc. (again, note fields can be bound or unbound)
    • Generally pick columnar style
    • Modify or preview result
    • Numerous properties can be set
      • Format (Appearance, scroll bars, etc.)
      • Data (recordsource, etc.)
      • Event (These can call macros and program code)
      • Other
  • 32.  
  • 33. Form Wizard (Instructor Led)
    • Build a simple data entry form based on the employees table
      • Modify the form when click finish
      • Set the caption property to “Maintain Employee Information”
      • Make text labels “semi-bold”
      • Size the form as desired
      • Set record selector to “NO” if desired
      • Save as frmEmployees
  • 34. Basic Employees form
  • 35. Form Wizard (On your own)
    • Build a simple data entry form based on the work_orders table
      • Modify the form when click finish
      • Set the caption property to “Work Orders”
      • Make text labels “semi-bold”
      • Size the form as desired
      • Set record selector to “NO” if desired
      • Save as frmWork_Orders
  • 36. Basic Work Orders Form
  • 37. Form Designer
    • Design surface for forms
    • Add controls from toolbox
    • Some controls themselves have wizards which can invoke certain actions (run query, open report, etc)
  • 38.  
  • 39. Form Designer
    • Build a criteria selection form for the parameter query qryParam (use design view)
      • Add an unbound control named txtOrderNo
      • Make sure the control wizard button is depressed
      • Add a button which will run the param query
      • Run the form. What happened? Why?
      • Save as frmParam
  • 40. Fix the query and form then rerun Change the variable names to look at the form
  • 41. Criteria Selection Form Results
  • 42. Subforms
    • Same idea as sub reports
    • Main form uses parent table; sub form uses child table
    • Several ways to create them
      • Create sub form first, drag and drop to main form
      • Use subform/subreport control
      • Create with form wizard directly
  • 43. Subforms
    • Same idea as sub reports
    • Main form uses parent table; sub form uses child table
    • Make sure you have a permanent link
    • Create sub form first, drag and drop to main form
    • Can also create with form wizard directly
  • 44. Typical Subform
  • 45. Subforms
    • Create a subform named sfrmLaborDetail
      • Use the form wizard
      • Base on qryLaborDetail_3 query
      • Pick tabular style (like a table or spreadsheet grid)
  • 46. Labor Detail Subform
  • 47. Subforms
    • Modify the frmWork_Orders form. It will be the new main form
      • Drag and drop the sub form sfrmLaborDetail
      • Remove extraneous labels
      • Size and format as you like
      • Save as frmWork_OrdersDetail
  • 48. Placing a subform on a main form
  • 49. Note link master and link child
  • 50. Work Orders Detail Form
  • 51. Sub Forms via the Wizard
    • Sub Forms can also be built automatically
    • Select parent table fields
    • Then child table fields
    • The child table will go in the subform
  • 52. Main and sub forms via Wizard (Instructor Demonstration)
  • 53. Totals on Master-Detail Forms
    • Common to add totals
      • Total of invoice line items
      • Total of purchase order line items
      • Etc.
    • Several ways
      • Add a total field to the subform footer (simplest)
      • Add a total field to the main report using a domain aggregate
      • Add a total field to the main report using an SQL aggregate
      • Probably others!
  • 54. Adding a total to a sub form
    • Works just like totals in reports
    • Add the total field in the footer
      • Add the sum so that control source reads = sum([ fieldname ]) with the equals sign
    • If desired can hide the footer field and add a field to the main form that references the total field on the subform
  • 55. Add a total to a sub form
    • Use the sfrmLaborDetail
    • Save as sfrmLaborDetail_Total
    • Expand the footer and add a field for hours
    • In the control source make sure expression is =sum([hours])
    • Now add the sub form to the frmEmployees main form
  • 56. Master-detail form with total
  • 57. Domain Aggregates (Concept demonstration)
    • Similar to Spreadsheet functions
    • Will total, etc., values in a field across several rows (records)
    • Can be used to populate a control on a form; say totals or counts of “columns” in a sub form
    • There are several: dlookup(), dsum(), dcount(), davg(), etc.
      • Syntax: Dname(“fieldname”,”source”, “criteria”)
      • Note: quotes are mandatory
  • 58. Domain Aggregates Use builder to help build domain aggregates
  • 59. Work Orders Form w/ Domain Aggregate
  • 60. Microsoft Access End of Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com

×