Results 1 to 3 of 3
  1. #1
    quicova is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    53

    On Change event in Text Boc

    Hello,

    I created a continues Form with a query and I have a text box for search
    In the query criteria in the column "Part_Name" I have:
    Code:
    Like "*" & [Forms]![Part_List_form]![Search_Box].[Text] & "*"
    Then In the form on the text box I created an Event Procedure

    Code:
    Private Sub Search_Box_Change()
        
        Me!Part_Name.Requery
        DoCmd.ShowAllRecords
        
    End Sub
    The problem is that I can only type 1 letter because it jumps of the text box every time I type something.


    If I change the procedure to After update it works, but what I want is that dynamic search style of search.

    Can anyone help me out with the code, how do I tell it to not jump of the text box

    Thanks so much
    Francisco

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Could use a combobox for the AutoExpand property and use AfterUpdate event.

    Or is this what you want http://allenbrowne.com/AppFindAsUType.html
    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.

  3. #3
    mrojas is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2013
    Location
    Concord California
    Posts
    72
    Why not create a "Search" button that the user clicks once is has input all the required information. Place your code under the OnClick event of button.

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

Similar Threads

  1. Recurring Change Event Erroe
    By dccjr in forum Programming
    Replies: 2
    Last Post: 02-18-2013, 08:26 PM
  2. Change Text Box Data Source On Open Event
    By mcktigger in forum Programming
    Replies: 1
    Last Post: 01-18-2013, 12:24 PM
  3. Trying to fire event on record change
    By danielhowden in forum Forms
    Replies: 3
    Last Post: 05-13-2011, 06:30 AM
  4. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  5. Using an event to change color of text.
    By michaeljohnh in forum Programming
    Replies: 3
    Last Post: 08-30-2010, 12:30 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