Results 1 to 2 of 2
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditionally hiding controls in subforms (2003)

    The LETTUR text box is the first control in the tab order of the subform, so it automatically becomes the active control when the form is loaded. Before hiding it, you must make another control active, for example ORE_MARC:

    Me!Mcom1.Form.ORE_MARC.SetFocus
    Me!Mcom1.Form.LETTUR.Visible = False
    Me!Mcom1.Form.ORA_LET.Visible = False

  2. #2
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditionally hiding controls in subforms (2003)

    I'm trying to make it so that that the LETTUR and ORA_LET text boxes on the startup form's subforms of the attached mdb don't display if the selected date is from 1998 onwards by putting code in the startup form's Load event but I get the Error message:
    <font color=448800>Run-time error '2165': Can't hide a control that has the focus.</font color=448800>

Posting Permissions

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