Results 1 to 4 of 4
  1. #1
    braveali is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    31

    Question Query with Where (Multiple Selections)

    Hi,

    I have a list of codes that I would like to select among 50,000 codes in MS Access Database:
    I can easily find one code but I don't know how to select multiple values:

    My Query is:

    SELECT [Codes for District].DistrictID, Univ2012.Schoolid

    FROM Univ2012 INNER JOIN [Codes for District] ON Univ2012.DistrictID = [Codes for District].DistrictID

    WHERE IN [((Univ2012.Schoolid)= 415030301, 415030303, 415030306, 415030309)]

    GROUP BY [Codes for District].DistrictID, Univ2012.Schoolid

    HAVING ((([Codes for District].DistrictID)=15));


    when I run this query it gave me Syntax Error in Where clause...



    I will appreciate your help to resolve my problem.

    Thanks

    Regards

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Offhand have you tried,
    WHERE Univ2012.Schoolid IN (415030301, 415030303, 415030306, 415030309).

    Thanks

  3. #3
    braveali is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    31

    Thumbs up

    its work perfect

    Thanks

    Cheers!

  4. #4
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Glad you got it working.

    Thanks

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

Similar Threads

  1. Replies: 2
    Last Post: 01-24-2014, 02:26 AM
  2. Replies: 3
    Last Post: 08-01-2011, 09:18 PM
  3. Multiple Selections from a List Box
    By oleBucky in forum Forms
    Replies: 4
    Last Post: 05-06-2011, 08:24 AM
  4. Multiple drop down selections
    By Tony1955 in forum Access
    Replies: 1
    Last Post: 09-05-2010, 01:46 PM
  5. Delete multiple selections
    By Evgeny in forum Programming
    Replies: 7
    Last Post: 07-20-2010, 01:14 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