Results 1 to 2 of 2
  1. #1
    aligahk06 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    94

    Search command in a form based on sql where clause


    Dear All,

    I want to give a search command in a form based on sql where clause so that it can give the quick and correct search from a table named WorkPermit.
    Table Name : WorkPermit
    Field : TenentName

    I want to enter three character in unbound field and then i want click search button then it return all the records that match this three character entered in unbound field.

    Please help me how can i do this by sql search code ?

    Rgds,
    aligahk06

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Build filter crieria and apply to form Filter property. Review this tutorial http://allenbrowne.com/ser-62.html

    Me.Filter = "TenentName LIKE '" & Me.textbox & "*'"
    Me.FilterOn = True
    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. SQL command in a search form.
    By agh5147 in forum Access
    Replies: 4
    Last Post: 06-19-2017, 12:09 PM
  2. Replies: 1
    Last Post: 05-06-2015, 01:23 PM
  3. Replies: 3
    Last Post: 03-29-2015, 07:42 PM
  4. Replies: 1
    Last Post: 02-27-2015, 10:01 AM
  5. Replies: 1
    Last Post: 09-12-2014, 06:09 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