Results 1 to 3 of 3
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097

    Bringing controls to the front during runtime

    I can't seem to find the control property that will bring a control to the front at runtime. The code below is wanting the three command buttons to appear in the lower right-hand corner of the expanded text box. As it is now, they are hidden behind the text box.

    Code:
    Private Sub tbURL_GotFocus()
    '*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    '  Expand the height of our URL text box to 2 inches and put the option buttons in the lower right corner.
    '*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    Me.tbURL.Height = 2880       'Bump our text box height up to 2 inches
    
    
    Me.cmdSaveURL.Top = Me.tbURL.Top + Me.tbURL.Height - Me.cmdSaveURL.Height
    Me.cmdCancelURL.Top = Me.tbURL.Top + Me.tbURL.Height - Me.cmdCancelURL.Height
    Me.cmdOpenURL.Top = Me.tbURL.Top + Me.tbURL.Height - Me.cmdOpenURL.Height
    Me.cmdSaveURL.Visible = True
    Me.cmdCancelURL.Visible = True
    Me.cmdOpenURL.Visible = True
    
    
    End Sub
    The buttons are visible, as I can just see the one of them peeking from behind:
    Click image for larger version. 

Name:	000.jpg 
Views:	10 
Size:	22.5 KB 
ID:	53322

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    Not clear what the requirement is - buttons to appear on top of the textbox? If so, whatever control has the focus will be on top. If that is the textbox, it will hide the controls behind

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    2,097
    Okay, the text box does indeed have the focus, so the short answer is that one cannot do what I was attempting. Not a big deal, I'll just let the option buttons hang off the bottom.
    Click image for larger version. 

Name:	001.jpg 
Views:	10 
Size:	31.5 KB 
ID:	53323

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

Similar Threads

  1. Replies: 8
    Last Post: 12-19-2012, 06:56 AM
  2. change color of form during runtime
    By Odelphi in forum Forms
    Replies: 2
    Last Post: 10-06-2012, 12:41 PM
  3. copying table during runtime in java
    By venkatesh.g in forum Access
    Replies: 5
    Last Post: 11-09-2011, 11:26 PM
  4. Replies: 0
    Last Post: 03-06-2011, 01:46 PM
  5. Bringing forward a data in a form
    By cwwaicw311 in forum Forms
    Replies: 9
    Last Post: 02-24-2010, 07:58 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