As I recall, the technique comes down to using the form's Height property.
You can set this dynamically.
HTH
- Turtle
John VS wrote in message ...
Marsh
Turtle wrote in message <8ni2jh$23g$1...@slb1.atl.mindspring.net>...
>This was included in an article in the Access-VB Advisor Magazine a
few
>months ago.
>
>As I recall, the technique comes down to using the form's Height
property.
>You can set this dynamically.
>
>HTH
> - Turtle
>John VS wrote in message ...
>>Hello,
>> I have a quick question, I want to make a form, where when you
click a
>>button labeled details, it will expand the current form and add room
at the
>>bottom to show you more information, about what you selected.
>> I know that I can trigger textboxes and comboboxs et. to become
visible
>>when you do certain actions, what I don't know how to do is make the
whole
>>form grow and shrink on a button click
[snip]
Here's a procedure to change the form's size to expose or hide the
bottom part of the form's detail section:
Const MARGIN As Integer = 0.05 * 1440
Private Sub cmdExpand_Click()
If cmdExpand.Caption = "Collapse" Then
Me.InsideHeight = txtDateCreated.Top - _
MARGIN + FormHeader.Height - _
FormFooter.Visible * FormFooter.Height
cmdExpand.Caption = "Expand"
Else
Me.InsideHeight = txtDateChanged.Top + _
txtDateChanged.Height + _
MARGIN + FormHeader.Height - _
FormFooter.Visible * FormFooter.Height
cmdExpand.Caption = "Collapse"
End If
End Sub
Where txtDateCreated is the name of the top most control to be hidden,
txtDateChanged is the name of the bottom most control to be exposed,
and cmdExpand is the name of the button.
Another approach that is sometimes useful is to put the extra controls
in the form's footer and make the footer visible or not.
Private Sub cmdShow_Click()
If FormFooter.Visible Then
cmdShow.Caption = "Show"
FormFooter.Visible = False
Me.InsideHeight = Me.InsideHeight - FormFooter.Height
Else
cmdShow.Caption = "Hide"
Me.InsideHeight = Me.InsideHeight + FormFooter.Height
FormFooter.Visible = True
End If
End Sub
Or you could go berserk and have two buttons . . .
Marsh
<<<<<Copy of private email<<<<<<<<<<<<
Thanks for the help,
The tip to use InsideHeight, was very helpful, or should be if I can
figure out how to use it. Now I am faced with the problem of figuring
out how to work with InsideHeight. I can't seem to make it do
anything except spit out error messages. And I found the help files
from Microsoft suck, when it comes to trying to explain how you work
with InsideHeight.
If you could help me in anyway with this InsideHeight property and
tying it to a button to change the size of a form. I would appreciate
greatly.
Thanks in advance,
John VS
Marshall Barton wrote in message
<8nibip$r5h$1...@slb1.atl.mindspring.net>...