expand/collapse parts of form

K

Katrina

I guess I did not explain what I would like to do well
enough in my first post.

What I was hoping to accomplish is to have sections of the
form that would expand and collapse on the click of a
button (like a +/- button)

I have 5 details sections that I dont always need to see,
so what I would like to do is have a way that I can hide
them and show each section individually with the click of
a button, almost like this website is set up in the laft
hand side, where clicking a + will expand the list.

Any suggestions for this?
 
P

Patrick

HI Katrina!!
I can think of one thing that could be used to emulate
the "+/-" sign.
A toggle button.
You could set-it up in the same way(Or prety close to-it)
to the "+/-" sign of the newsgroup.
You probably have to experiment a bit to get the desired
result. Insert a toggle button somewhere on your for and
in the 'Click' event of it type the following code:
**********************
Dim sw As Boolean

sw = tglTest.Value

If sw Then 'True or -1.
MsgBox "Pressed on the toggle button!"
Else 'False or 0.
MsgBox "released toggle button!"
End If
********************
This allows you to execute code when someone presses or de-
pressses the toggle button..
When its true, it means that the user just press on it.
So you can write some code instead of the msgbox that
would show the desired section...
and in the false statement you would put code that hides
that section again.

hope this helps, or hopefully give you some ideas,
PAtrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top