Results 1 to 3 of 3
  1. #1
    paularthur09 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    4

    Wink Form Filter - NOT IN

    Hi,



    I am trying to find out if there are any restrictions on the amount of NOT IN filters you can use in VBA.

    The below does not seem to work :-/. How can I separate this onto different lines as VBA does not like it.

    Forms![QD Measures]![Measures Query Sub].Form.Filter = "[Measure] NOT IN ('QD-321','QD-322','QD-323','QD-324','QD-325','QD-326','QD-327','QD-328','QD-329','QD-330','QD-331','QD-332','QD-333','QD-334','QD-337','QD-338','QD-339','QD-340','QD-341','QD-342','QD-343','QD-344','QD-345','QD-346','QD-347','QD-348','QD-352','QD-353','QD-354','QD-355','QD-356','QD-357','QD-358','QD-359','QD-360','QD-361','QD-362','QD-363','QD-33','QD-97','QD-23','QD-32','QD-27','QD-24','QD-35','QD-52','QD-108','QD-28','QD-29','QD-31','QD-47','QD-30','QD-206','QD-369','QD-370','QD-371','QD-372','QD-373','QD-374','QD-375','QD-376','QD-377','QD-378','QD-379','QD-380','QD-381','QD-382','QD-383','QD-384','QD-385','QD-386','QD-387','QD-388','QD-389','QD-390','QD-391','QD-392','QD-393','QD-394','QD-395','QD-396','QD-397','QD-398','QD-399','QD-400','QD-401','QD-402','QD-403','QD-404','QD-405','QD-406','QD-407','QD-408','QD-409','QD-410','QD-411','QD-412','QD-413','QD-414','QD-415','QD-416','QD-417','QD-418','QD-419','QD-420','QD-421','QD-422','QD-423','QD-424','QD-425','QD-426','QD-427','QD-428','QD-429','QD-430','QD-431','QD-432','QD-433','QD-434','QD-435','QD-436','QD-208','QD-209','QD-210','QD-211','QD-212','QD-213','QD-214','QD-215','QD-217','QD-218','QD-219','QD-220','QD-221','QD-222','QD-223','QD-224','QD-225','QD-226','QD-227','QD-228','QD-229','QD-230','QD-231','QD-232','QD-234','QD-235','QD-236','QD-237','QD-238','QD-239','QD-240','QD-241')"

    Any help would be really appreciated.

    Paul

  2. #2
    paularthur09 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    4
    I just added a flag to indicate if the measure falls into one of these categories.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    There are limits on number of characters in SQL statement (64,000) and number of characters in a parameter (255), number of characters in a cell in query design grid (1,024). https://support.office.com/en-us/art...9-EA9DFF1FA854

    I expect your IN parameter could hit one of those eventually.
    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. Replies: 9
    Last Post: 02-24-2015, 11:19 AM
  2. Filter By Form and Apply Filter Buttons
    By JustLearning in forum Forms
    Replies: 13
    Last Post: 02-18-2015, 01:01 PM
  3. Replies: 5
    Last Post: 02-07-2013, 12:21 PM
  4. Replies: 1
    Last Post: 08-16-2012, 01:51 PM
  5. Replies: 28
    Last Post: 03-08-2012, 06:47 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