How to hide form from grid 2 to 4

A

Adnan

I have a form that I’m using as main form menu, I need three different
portions to be able to hide and view. I know how to hide acDetail section,
Heared or footer but do not know how to hide a potion of the form only, i.e.:
on detail section hide form from grid 2 to 4.

Any help, tip or comment is greatly appreciated,
Adnan
 
S

Stefan Hoffmann

hi Adnan,
I have a form that I’m using as main form menu, I need three different
portions to be able to hide and view. I know how to hide acDetail section,
Heared or footer but do not know how to hide a potion of the form only, i.e.:
on detail section hide form from grid 2 to 4.
Why do you hide sections of your form dynamically? Can you explain your
needs for that?


mfG
--> stefan <--
 
A

Adnan

When you open My Documents folder in Windows XP, you know the way the left
side pane looks like, the one that when you click collapses and then expands
with tools. This is exactly what I am trying to do in a form. Have a menu
with command buttons (the same as the left task pane in My Documents folder)
on the left side, and then view forms, reports, etc from there. Now, my
question is, how to collapse/expands these three groups. I was hoping there
is a way to hide grid, say from grid 2 to 4, which would then hide the group
etc...

Here’s a sample of My Docs folder with left task pane….
http://www.meistermed.com/images/tutorial/isilo_folder_in_my_documents.jpg

Thank you,
Adnan
 
S

Stefan Hoffmann

hi Adnan,
When you open My Documents folder in Windows XP, you know the way the left
side pane looks like, the one that when you click collapses and then expands
with tools.
Ah, okay. This is not that easy. Consider this layout:

/-----------------------\
| section: Header |
*-----------------------*
| section: Detail |
| /--------\ /--------\ |
| | Pane 1 | | Pane 2 | |
| \--------/ \--------/ |
| |
*-----------------------*
| section: Footer |
\-----------------------/

You may implement Pane 1 and 2 as subforms and use [Pane 1].Visible =
False to hide the left pane.
But you have to resize Pane 2 manually, e.g.

Private Sub HidePane1()

Pane1.Visible = False
Pane2.Left = Pane1.Left
Pane2.Width = Pane2.Width + Pane2.Left - Pane1.Left

End Sub



mfG
--> stefan <--
 
G

George

You'll need to identify the controls within the "grids" you want to hide and
hide or reveal them individually.

<air code>
Select Case
Case HideGroupONE
Me.Control1.Visible = False
Me.Control2.Visible = False
Me.Control3.Visible = False
Case HideGroupTWO
Me.Control4.Visible = False
Me.Control5.Visible = False
Me.Control6.Visible = False
......
End Select
</air code>

There are other techniques you can employ, but they will all involve
managing each control in a "grid"

George
 
A

Adnan

Stefan/George,

Thanks for your response, the code works but is still not what I am looking
for, this code hides the controls but does not shift the other controls
up/down as needed as it shows on 'My Documents' folder left pane.
 
S

Stefan Hoffmann

hi Adnan,
Thanks for your response, the code works but is still not what I am looking
for, this code hides the controls but does not shift the other controls
up/down as needed as it shows on 'My Documents' folder left pane.
My code gives you an example of how to do it. Where's the problem?

mfG
--> stefan <--
 
A

Adnan

Stefan,

I am using a tree view method instead.

You code is fine but then I have to have another code to shift the other
panes (up/down), etc… so I figured I use tree view.

Again, I do appreciate your time and help!
Adnan
 

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