Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2016

    Unanswered: Hidden Option Boxes

    I have some Option boxes that are showing up on my print preview page and my printed copy of my form. They do not show up on the design view nor do they show up on the form view. Is there any way I can get rid of these. I tried copying the form but to no avail. They still show up. Thanks for any help.

    I have it figured out. Problem solved.
    Last edited by Arff10883; 03-24-16 at 18:38.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    The controks are ptobably hidden behind another control. So if you have a printed copy of the form you will know where the controls are. Move any other visible controls till you find 'em

    Alternativel if you know the name of the controls, select each control in the properties dialog and that should set the focus onto the selected control
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 15
    I would make an inventory of all the controls in the form then identify each of them:
    Sub ListControls(ByVal FormName As String)
        Dim obj As AccessObject
        Dim ctl As Control
        For Each obj In CurrentProject.AllForms
            If obj.Name = FormName Then
                DoCmd.OpenForm FormName, acDesign
                For Each ctl In Forms(FormName).Controls
                    Debug.Print ctl.Name, TypeName(ctl.ControlType)
                Next ctl
                Exit For
            End If
        Next obj
        If obj Is Nothing Then MsgBox "Cannot find the Form " & FormName & " in the current project.", vbInformation, "ListControls"
        Set obj = Nothing
    End Sub
    Function TypeName(ByVal ControlType As Long) As String
        Select Case ControlType
            Case acBoundObjectFrame: TypeName = " Bound object frame  "
            Case acCheckBox:         TypeName = "  Check box  "
            Case acComboBox:         TypeName = "  Combo box  "
            Case acCommandButton:    TypeName = "  Command button  "
            Case acCustomControl:    TypeName = "  ActiveX (custom) control  "
            Case acImage:            TypeName = "  Image  "
            Case acLabel:            TypeName = "  Label  "
            Case acLine:             TypeName = "  Line  "
            Case acListBox:          TypeName = "  List box  "
            Case acObjectFrame:      TypeName = "  Unbound object frame or chart  "
            Case acOptionButton:     TypeName = "  Option button  "
            Case acOptionGroup:      TypeName = "  Option group  "
            Case acPage:             TypeName = "Page"
            Case acPageBreak:        TypeName = "  Page break  "
            Case acRectangle:        TypeName = "  Rectangle  "
            Case acSubform:          TypeName = "  Subform/subreport  "
            Case acTabCtl:           TypeName = "  Tab  "
            Case acTextBox:          TypeName = "  Text box  "
            Case acToggleButton:     TypeName = "  Toggle button  "
            Case Else:               TypeName = "<Unknown Control Type>"
        End Select
    End Function
    e.g. (for listing the controls in a form named "Form5", open the immediate window (Ctrl+G) and type: ListControls "Form5"
    This yields (in the immediate window):
    Col1            Text box  
    Label1          Label  
    Col2            Text box  
    Label2          Label  
    Col3            Text box  
    Label3          Label  
    Col4            Text box  
    Label4          Label  
    Command_Duplicate             Command button  
    Combo_Pk        Combo box  
    Label0          Label
    You can then use the Controls selector combo of the Properties window (F4) to identify and locate each control in the list.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts