Results 1 to 8 of 8
  1. #1
    item67 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2015
    Posts
    6

    Trigger from input in a textbox without clicking enter


    Hello, I have a question. A have a form whit a textbox (for 1 charater). When I enter a character in the textbox en click on enter it activates some changes on the form (afterupdate event). This works fine but I want to activate the change without clicking on enter. Ergo if I enter the value the change should take place. Is this possible?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    Have you tried using the On Change event instead of the After Update event.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    item67 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2015
    Posts
    6
    Yes I tried that but it did not give the response I want.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    So what response did it give and how was it different from what you wanted
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    item67 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2015
    Posts
    6
    Well when I use this event I have to enter the character, click enter and enter the character again to activate.

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    1. In the Table make the length of the underlying Field to 1
    2. In the Form set it's Input Mask to L
    3. In Properties - Other set the AutoTab Property to Yes

    Or, where X is the maximum length of the data in YourTextBoxName and NameOfNextControl is the next control to gain focus.

    Code:
    Private Sub YourTextBoxName_Change()
      If Len(Me.YourTextBoxName.Text) = X Then 
        NameOfNextControl.SetFocus
      End If
    End Sub

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    PC-Gram is offline Novice
    Windows 10 Access 2013
    Join Date
    Jan 2016
    Location
    Denmark
    Posts
    5
    This works:

    Private Sub No1_KeyUp(KeyCode As Integer, Shift As Integer)
    Me.No2.SetFocus
    End Sub

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

Similar Threads

  1. Replies: 8
    Last Post: 06-05-2014, 12:08 PM
  2. Replies: 6
    Last Post: 10-01-2013, 10:58 AM
  3. Replies: 2
    Last Post: 05-27-2013, 09:57 AM
  4. How to enter special character ' in textbox
    By uronmapu in forum Access
    Replies: 1
    Last Post: 07-25-2012, 04:02 AM
  5. Capture enter key on password textbox
    By sarnata in forum Forms
    Replies: 2
    Last Post: 09-09-2010, 10:41 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