Results 1 to 2 of 2
  1. #1
    ONT is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2012
    Posts
    1

    Parameter query that looks at form textboxes for criteria

    I have a query that is set to look at data inside of text boxes in a form for the query's criteria. The underlying data in the table is numberical.

    In the form, I have textboxes to specify a beginning number and an ending number to be used for a range and a textbox for a list of values separated by commas. The query uses the between operator for the range and this works. Then, on the criteria "or" line, it uses the in operator for the list. It works if I input the values directly in the query, such as In(30,50,55,98), but not if I put those same values into the form textbox and direct the query to look to that textbox. If I put only one value in the textbox, it works, but not if I have multiple values.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    That's because the textbox input is only a string of characters - including the commas - not a set of values.

    Review this for a method to create multi-value criteria from a listbox 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.

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

Similar Threads

  1. Replies: 5
    Last Post: 09-20-2012, 03:27 PM
  2. Replies: 3
    Last Post: 12-08-2011, 10:52 AM
  3. Replies: 1
    Last Post: 11-10-2011, 08:07 PM
  4. Replies: 3
    Last Post: 08-15-2011, 10:06 AM
  5. Criteria Parameter
    By djwasim in forum Reports
    Replies: 1
    Last Post: 07-04-2009, 08:22 AM

Tags for this Thread

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