Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    zashaikh is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    182

    SELECT [Event Number],State1 As StateX FROM qryNRStateC2 Where Not IsNull(State1)
    UNION SELECT [Event Number],State2 As StateX FROM qryNRStateC2 Where Not IsNull(State2)
    UNION SELECT [Event Number],State3 As StateX FROM qryNRStateC2 Where Not IsNull(State3);

  2. #17
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I meant the second one that refers to this one. I assume this one runs without that error.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #18
    zashaikh is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    182
    Sorry

    SELECT StateX, Count(*) As HowMany
    FROM qryNRStateC3
    GROUP BY State1;

    I get an error saying:

    Youre query foes not include the specified expression "StateX" as part of an aggregate function.

  4. #19
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Like I said, I edited it after posting. Try:

    SELECT StateX, Count(*) As HowMany
    FROM qryNRStateC3
    GROUP BY StateX
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #20
    zashaikh is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    182
    Thank you soo much!!!! I think it worked! It worked perfectly!

  6. #21
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 08-31-2016, 07:55 AM
  2. Replies: 1
    Last Post: 05-28-2016, 07:06 AM
  3. Replies: 3
    Last Post: 04-03-2016, 03:00 PM
  4. Replies: 2
    Last Post: 02-05-2015, 03:51 PM
  5. Replies: 4
    Last Post: 10-15-2014, 05:51 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