Results 1 to 7 of 7
  1. #1
    erickfloyd's Avatar
    erickfloyd is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2017
    Posts
    18

    Lightbulb Vba code to automatic select a frame button when i click on a textbox


    I need Vba code to automatic select a frame button when i click on a textbox

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Set focus to it or set the value of it?

    Me.FrameName = x

    to set the value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    erickfloyd's Avatar
    erickfloyd is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2017
    Posts
    18
    Thank you!! Done! That's works but now i'm trying to keep two actions together but i can't.


    Private Sub Text11_Click()
    Me.Frame19 = "3"
    End Sub

    Private Sub Text11_Click()
    Text11.Value = ""
    End Sub

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    More like:

    Code:
    Private Sub Text11_Click()
      Me.Frame19 = "3"
      Text11.Value = ""
    End Sub

    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Oh, and I'd expect the frame to have a numeric value (no quotes around the 3).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    erickfloyd's Avatar
    erickfloyd is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2017
    Posts
    18
    pbaldy thanks a lot, you cleared my doubts!!!

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 02-26-2016, 05:28 AM
  2. On Button Click, Record Date & Time to a Textbox
    By JakeMurray27 in forum Programming
    Replies: 2
    Last Post: 02-20-2016, 04:22 AM
  3. Replies: 1
    Last Post: 09-29-2015, 02:25 AM
  4. Replies: 2
    Last Post: 03-11-2015, 08:50 AM
  5. Replies: 3
    Last Post: 09-13-2012, 08:18 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