Results 1 to 3 of 3
  1. #1
    sneupane is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    7

    Access query Error

    I am trying to run this query

    SELECT WeeklyWorksheetTable.Style, ItemIndex.Component
    FROM ItemIndex INNER JOIN WeeklyWorksheetTable ON ItemIndex.Style = WeeklyWorksheetTable.Style
    GROUP BY WeeklyWorksheetTable.Style, ItemIndex.Component
    HAVING ((Left([ItemIndex]![Component],3)="ZSK" Or Left([ItemIndex]![Component],3)="ZBL"));

    And I am getting this error:


    You tried to execute a query that does not include the specified expression'Left([ItemIndex]![Component,3])="ZSK" Or Left([ItemIndex]![Component,3])="ZBL" as part of an aggregate function

    I would appreciate for any help

    Thanks Sar

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    See if this works:

    SELECT WeeklyWorksheetTable.Style, ItemIndex.Component
    FROM ItemIndex INNER JOIN WeeklyWorksheetTable ON ItemIndex.Style = WeeklyWorksheetTable.Style
    WHERE Left([ItemIndex]![Component],3)="ZSK" Or Left([ItemIndex]![Component],3)="ZBL"
    GROUP BY WeeklyWorksheetTable.Style, ItemIndex.Component
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sneupane is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    7
    Hi paul,

    I tried by using group by and gave me the same error. But I solved the issue finally. I changed the query structure. Any way thank you so much for your valuable time.

    Sar

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

Similar Threads

  1. Replies: 0
    Last Post: 03-04-2010, 06:32 PM
  2. Access to SQL error
    By dalet in forum Programming
    Replies: 5
    Last Post: 10-16-2009, 07:43 AM
  3. append query error
    By shashigk in forum Queries
    Replies: 2
    Last Post: 09-22-2009, 07:17 AM
  4. Inconsistent Query Error...
    By DHavokD in forum Queries
    Replies: 8
    Last Post: 06-11-2009, 09:58 AM
  5. Query Error
    By zephaneas in forum Queries
    Replies: 0
    Last Post: 11-12-2008, 02:40 PM

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