BUidlling a query/report with several keys

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • patriciashoe
    New Member
    • Feb 2008
    • 41

    #1

    BUidlling a query/report with several keys

    I have a database that consists of several tables all linked by a school id number.The other tables hold data related to the schools. Another field common to all tables is a date field. I could use some direction on how to structure a query that selects data by school and year. The linked tables hold data for a number of years and I need to query and report on just one year at a time by school. For example, for each school I need all the data for 2008. In essence I am filtering the data by year but I ma not sure how to do this for my report. Thanks for getting me started.
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    You could have a form that has textboxes at the top where the user enters the year and the school.
    Your queries could then use those textboxes as selection criteria.

    The textboxes could be invisible and updated from combo boxes when the user selects something from the dropdown list.

    Is that the sort of thing you mean?

    Comment

    • patriciashoe
      New Member
      • Feb 2008
      • 41

      #3
      Originally posted by Delerna
      You could have a form that has textboxes at the top where the user enters the year and the school.
      Your queries could then use those textboxes as selection criteria.

      The textboxes could be invisible and updated from combo boxes when the user selects something from the dropdown list.

      Is that the sort of thing you mean?
      Actually that is what I am doing on a form to see the data for a given year. Now, how do I do the same thing to produce a report? I have some code in the form that filters each related table. Could I use a similar report in constructing a report?

      Thanks

      Comment

      • Delerna
        Recognized Expert Top Contributor
        • Jan 2008
        • 1134

        #4
        You could.
        You could also base the report off a query that is using those controls on the form as filters. The form would of course need to be open when you call the report, perhaps from a button on the form.

        Comment

        Working...