Results 1 to 4 of 4
  1. #1
    nutmeg is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2012
    Posts
    2

    Query for Report

    Hello,



    I'm a new user and having trouble completing a case for a university information systems class.

    The project includes creating a customer table and a product table, and creating various queries & a report.

    One query problem is to create a query to list all products that have been ordered by a given number of customers (in this case, 30).

    We successfully did that by doing this (deals are products and signups are orders).

    Here is a picture of the design view and here is the SQL view: (the instructions noted for only Deal # and Description to be visible)

    Code:
     SELECT [Deal Table].[Deal #], [Deal Table].Description
    FROM [Deal Table] INNER JOIN [Signup Table] ON [Deal Table].[Deal #] = [Signup Table].[Deal #]
    GROUP BY [Deal Table].[Deal #], [Deal Table].Description
    HAVING (((Count([Signup Table].[Deal #]))>30));

    Our problem that we can't figure out is that we have to take the results from this data and create (1) a query to output the description of each deal and the names of customers signed up for the deals that have over 30 orders and (2) generate a report from the query and group records based on the description field.

    When we add customer names and emails to the design view, no data shows up in the datasheet view, and we get various error messages when trying to tweak it.

    This is a screenshot of the example in the assignment.

    Thank you for any help or ideas you can offer!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Try doing a query that joins the first query to the Signup table

    BTW, advise not to use spaces, special characters, punctuation (underscore is exception) in names.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    nutmeg is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2012
    Posts
    2
    Quote Originally Posted by June7 View Post
    Try doing a query that joins the first query to the Signup table

    BTW, advise not to use spaces, special characters, punctuation (underscore is exception) in names.
    Thanks for the feedback.. But I have no idea how to do that, if you could provide some details I would really appreciate it! Thank you

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Use query designer. Drag the query and the Signup table to the query designer window, join on the common Deal # fields, drag fields to the design grid. Access Help has guidance on using the designer. Basic Access functionality.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sub report of a complex query/report
    By roar58 in forum Reports
    Replies: 1
    Last Post: 03-11-2012, 08:41 PM
  2. Replies: 1
    Last Post: 07-15-2011, 10:59 PM
  3. Report based on query + sub-report (1:N relation)
    By BayerMeister in forum Reports
    Replies: 1
    Last Post: 08-19-2010, 03:26 AM
  4. Replies: 3
    Last Post: 05-21-2010, 03:57 PM
  5. Replies: 1
    Last Post: 02-02-2009, 05:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums