Results 1 to 4 of 4
  1. #1
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94

    Form text search query command

    Dear All,



    Query search command in form text search won't give result.While inputing three character in employee name field and then clicking on search query it won't give the result. i can filter through combo box, but i want an alternative solution by serach query command.
    i want to enter first three character of the name in text box field.
    Please see attached DB and form:
    Note: The clear command button work fine but search query won't give result.

    thanks,
    aligahk06
    Attached Files Attached Files

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    usual way would be something like

    me.filter="empname like '" & txtsearch & "*'"
    me.filteron=true

  3. #3
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    Its work fine , after using search command its display the desired result but the combo box selection won't display the result. Before combo was working fine.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I don't use macro's so cannot comment on them. Looks like you might be mixing up filtering (which reduces the list of records which is the code I provided) and finding - which doesn't reduce the list but just navigates to the first record which meets the criteria

    not sure why you need the searchbox since the user can type 3 characters into the combo and then select from there - easier if your sorted the rowsource

    SELECT [TelephoneList].[EmpName] FROM TelephoneList ORDER BY [EmpName];

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

Similar Threads

  1. Search command in form
    By aligahk06 in forum Access
    Replies: 4
    Last Post: 07-07-2020, 04:57 PM
  2. SQL command in a search form.
    By agh5147 in forum Access
    Replies: 4
    Last Post: 06-19-2017, 12:09 PM
  3. Replies: 1
    Last Post: 05-06-2015, 01:23 PM
  4. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  5. Replies: 1
    Last Post: 03-19-2012, 11:03 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