Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Expanding a form (AccessXP)

    Is there a way to have a form that expands on a click of a button. I want the normal form to be 3 x 5, or there about. If the user clicks a button I want the form to expand to 3 x 8 with instructions in the new area. Is this possible? If so what do I need to do?

    Thanks for the help.

    Fay

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Expanding a form (AccessXP)

    Attached is a little sample with it working.
    Attached Files Attached Files
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Expanding a form (AccessXP)

    You could set the AutoResize property of the form to No; also set the Scrollbars property of the form to Horizontal or None (you don't want Vertical or Both here). You probably don't want the user to be able to resize the form manually, so set the Border Style to Dialog.

    Create a label or text box with the instructions, then resize the form in design mode so that these instructions are not visible. You may have to switch back and forth between design mode and form view to get it right.

    Let the OnClick event procedure of the command button resize the form, for instance

    Me.InsideHeight = 8 * 1440

    (VBA measures sizes in twips; there are 1440 twips in one inch)

    Alternatively, you can use

    RunCommand acCmdSizeToFitForm

Posting Permissions

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