Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    8

    Unanswered: Query related to 2 tables,how to group

    I need a query related to 2 tables: audits and meetings

    there are more meetings related to one audit and in the end I need the result of the query in a form, which has a subform with dates of the meetings. The problem is, with my query I get every audit as entry in a form as often as the number of meetings. It should show audit only once and the meeting dates in the subform, if there are several dates for meeting it should still show only one audit. I get the meetings shown in a subform right, but audits are listed repeatedly for each new meeting date



    the query is like:

    SELECT audits.auditname, audits.auditnr, audits.result, audits.responsible, meetings.date, meetings.status FROM audits LEFT JOIN meetings ON audits.auditnr = meetings.auditnr ORDER BY meetings.date DESC;


    what should I do??
    I can use group by only with aggregat functions and I cannot take agg. function of every attribute that I need, like for result-its a description,or responsible is a name etc

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    based on your description it sounds like what you really need is simpler;

    make a Main Form that is sourced on Audits

    in this Main Form insert a subform that is sourced on Meetings

    the subform wizard will prompt you to set up the common crossreferencing field between the two....

    and that's it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •