Results 1 to 3 of 3
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    135

    Disable Enter Key on subform

    I have a subform which has 3 textbox fields, each textbox has an associated search button for searching the text in the associated textbox.



    Ideally it would be nice to have the enter key work on the textbox that has focus to activate the code behind the associated search button but I don't think that's possible?

    If I could disable the Enter key and force the user to use the associated search button that would be fine.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    51,755
    Why 3 buttons? Why not just one button? Or use each textbox AfterUpdate event - that would be triggered when Enter key is pressed. Have a single procedure that constructs the filter criteria and call that procedure from as many events as you want. Review http://allenbrowne.com/ser-62.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
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    11,616
    Or cascading combos?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 5
    Last Post: 01-14-2021, 10:00 AM
  2. Disable subform
    By Behrooz in forum Forms
    Replies: 3
    Last Post: 05-17-2019, 09:00 AM
  3. Disable subform using a module
    By gg80 in forum Programming
    Replies: 4
    Last Post: 05-17-2015, 07:39 PM
  4. disable controls on a subform,
    By jaymin in forum Database Design
    Replies: 2
    Last Post: 06-23-2012, 07:05 AM
  5. Disable new entry in subform
    By mdewell in forum Forms
    Replies: 3
    Last Post: 01-05-2012, 02:38 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