Results 1 to 4 of 4
  1. #1
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376

    Need to find records in special circumstances

    Hello all,

    I ran into an issue the other day and I had thought I had a solution over the weekend but as it turns out, it doesn't seem to work.

    I have a form with a subform that the user has to enter lot numbers into, these get written to a table. Most of the time, any row will have only 1 lot number associated with it, however, occasionally, there may be 2 lot numbers associated with a single row, the lot numbers separated by a comma.

    Example 1: Part 12345, Lot 456789
    Example 2: Part 12345, Lot 456789, 567890



    The issue I have is that I have a query that looks through the table the data is being written to to find info about the lot number, like what part was it used in, how many pieces, how many different assemblies, etc. This all works fine unless there is more than 1 lot used as in Example 2. I have tried to use a Wildcard (*) but it doesn't return the instances where more than 1 lot number is used.

    In the "Criteria" for the query, I have [Enter Lot Number] so the user has to enter the info for the lot number in question.

    Any thoughts?

    Dave

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Try this criteria:
    Code:
    Like "*" & [Enter Lot Numer] & "*"

  3. #3
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    JoeM,

    That worked like a Charm. Thank you. I never thought about putting the "Like" in there like you did. Thanks for educating me a bit more today.

    Dave

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome.
    Glad I was able to help!

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

Similar Threads

  1. Replies: 10
    Last Post: 10-10-2012, 11:15 PM
  2. Replies: 1
    Last Post: 01-17-2012, 02:50 PM
  3. Replies: 1
    Last Post: 10-24-2011, 08:01 AM
  4. Can't find records in combo box
    By darklite in forum Forms
    Replies: 6
    Last Post: 07-07-2011, 02:33 PM
  5. Replies: 0
    Last Post: 02-01-2011, 04:49 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