Results 1 to 3 of 3
  1. #1
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117

    Como box search

    I have the following search which looks for any part which is called up in the combo box.
    [Forms]![INSPECTIONSHEET]![Combo25]
    Is it possible to amend this so I can look for any part which contains the details of the combo box but does not necessarilt match it
    For example:-
    If the combo box says ABC123 I will find all of those results
    Can I amend the code so that it will now also find the record ABC123, ABC124


    I know the * wildcard exists, but can it be used in this instance

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    The wildcard only looks for the text you enter
    searching ABC123*
    will NOT find ABC124
    tho
    ABC12* will

    put ABC12 in the text box
    run the query that has this sql
    select * from table where [field] like *" & forms!frmFind!txtBox & "*"




  3. #3
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Click image for larger version. 

Name:	ACCESS QUERY.PNG 
Views:	7 
Size:	12.9 KB 
ID:	22041

    The snapshot above shows how the combo is being used.I understand the power of the * when using as a search tool. What I don't know is what change to make to the code shown above so it will then use the code you suggest.

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

Similar Threads

  1. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  2. Replies: 1
    Last Post: 03-26-2015, 11:08 AM
  3. Replies: 3
    Last Post: 01-04-2015, 06:09 PM
  4. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  5. Replies: 7
    Last Post: 08-08-2012, 03:28 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