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

    form field plus wildcard doesnt work for number 1

    I have a report that is based on a query that uses a form field for the criteria. Like [Forms]![f_Danielle]![Customer] & "*" . I do this because if the selection field is left blank I want to get all the customers.

    This works fine for most of my customers but doesnt work when i use a customer with a low digit number

    For example, if I select a customer with customer number of 1 it will select all customers that start with 1.

    If i choose customer 8 it will select all customers that start with 8
    If i choose customer 9 it will select all customers that start with 9

    If i choose customer 10 it selects all customers have 10 at the begining

    So when a full customer number is chosen, like 11624, it works fine because there are no other customers with number 11624???

    Is there a way to make it so that it still selects all customers when I leave it blank but will be more specific with the number chosen?

  2. #2
    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 doesn't work well for numeric fields. Try this instead:

    http://theaccessweb.com/queries/qry0001.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Yes, that works perfect. I will remember that about like for in the future.

  4. #4
    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

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

Similar Threads

  1. Replies: 3
    Last Post: 03-26-2015, 06:50 PM
  2. Add new Record button doesnt work
    By zmbaker in forum Forms
    Replies: 1
    Last Post: 07-25-2014, 03:28 PM
  3. NZ() doesnt work for date range
    By tagteam in forum Access
    Replies: 3
    Last Post: 03-12-2014, 11:10 AM
  4. Replies: 6
    Last Post: 09-02-2012, 04:30 PM
  5. Help I dunno y it doesnt work
    By zaza123 in forum Programming
    Replies: 7
    Last Post: 07-03-2011, 06:43 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