Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    123

    Unanswered: Resize form after hide/show

    I want to allow users to hide/show a section of a form, most likely the Detail section. How do I automatically resize the entire form after the Detail section is shown or hidden? The Pop Up property stays "Yes" and the Border Style stays "Sizable".

  2. #2
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    hold on do you mean resize the content of the form to hide the details after the size of the form is changed or to resize the form it the details are hidden

    write a routine in VBA that is caled by Form.Resize or Button.Click or something simalar
    check the sizes against your template and then change the sizes as needed
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    You may be able to use the command: DoCmd.Restore
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Aug 2003
    Posts
    123
    Right now on the Click event of a command button, I do

    Me.Detail.Visible=False

    and I want the entire form to then shrink accordingly. When I do

    Me.Detail.Visible=True

    I want the form to grow again.

  5. #5
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    It's been a while since i used VBA but i think

    Me.Detail.Visible=False
    Me.Width =Me.Width - Me.Detail.Width

    Me.Detail.Visible=True
    Me.Width =Me.Width + Me.Detail.Width

    should do it

    change that to height if the details is at the bottom of the form
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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