Results 1 to 5 of 5
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486

    Allow users a text area to enter comma separated values as parameters

    I would like to give users a text box where they can create a comma separated list of car numbers that will then be used as the parameter of a query.



    For example: user enters 1,3,55,7789,334

    And those 5 values get used as the parameter of a query and it returns results for only those 5 cars.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Don't think will work with dynamic parameter in a query object.

    Review: http://allenbrowne.com/ser-50.html
    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.

  3. #3
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Too many cars to do a multi select. There are over 4,000. What are some other options to allow a user to type in a list of 5 or 6 car numbers to search by?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    It could be done with VBA. I don't think there is a built in array function but I would start there. I am trying to recall what options there are for building an array. Anyway, with that you could add where criteria to a form's RecordSource or a Query Object

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Textbox seems to work instead of combobox to set form/report filter property with IN operator. It does work in my quick test. No array needed.

    Or review: https://social.msdn.microsoft.com/Fo...orum=accessdev

    Or maybe use QueryDefs to modify query object

    Or maybe programmatically set form or report RecordSource property
    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: 8
    Last Post: 06-04-2014, 10:41 AM
  2. exporting query to text comma separated
    By Pasi in forum Queries
    Replies: 6
    Last Post: 12-27-2013, 06:42 PM
  3. Replies: 6
    Last Post: 06-26-2011, 12:15 AM
  4. Replies: 2
    Last Post: 04-07-2011, 10:15 AM
  5. Replies: 1
    Last Post: 07-31-2009, 03:57 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