dbTalk Databases Forums  

Hiding Treeview subform

comp.databases.ms-access comp.databases.ms-access


Discuss Hiding Treeview subform in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Hiding Treeview subform - 12-23-2010 , 10:47 AM






Hi,

I have a subform that holds a treeview. Sometimes the user needs to
hide the subform. Since it collapses to the left I replace that
subform with another subform that's a button to open it back up again
using the SourceObject.

The problem is that once the subform w/ Treeview is opened back up the
Treeview must be regenerated. Since this sometimes will take a few
seconds and always resets their position in the tree this is not good.

I have thought about a way around this but want to know if there is a
simple way to save this SourceObject's state in the background and
restore it to the subform again?

I thought maybe this was the right direction:

Dim frmTV As Form_frmTreeView
Set frmTV = New Form_frmTreeView

Forms!frmMain!frmTreeView.SourceObject = frmTV


but it isn't working. Thanks!

Reply With Quote
  #2  
Old   
Tom van Stiphout
 
Posts: n/a

Default Re: Hiding Treeview subform - 12-25-2010 , 11:20 AM






On Thu, 23 Dec 2010 08:47:14 -0800 (PST), "christianlott1 (AT) yahoo (DOT) com"
<christianlott1 (AT) yahoo (DOT) com> wrote:

If performance is a concern, you may want to hide the subform rather
than set the SourceObject:
Me.mySubform.Visible = False

-Tom.
Microsoft Access MVP


Quote:
Hi,

I have a subform that holds a treeview. Sometimes the user needs to
hide the subform. Since it collapses to the left I replace that
subform with another subform that's a button to open it back up again
using the SourceObject.

The problem is that once the subform w/ Treeview is opened back up the
Treeview must be regenerated. Since this sometimes will take a few
seconds and always resets their position in the tree this is not good.

I have thought about a way around this but want to know if there is a
simple way to save this SourceObject's state in the background and
restore it to the subform again?

I thought maybe this was the right direction:

Dim frmTV As Form_frmTreeView
Set frmTV = New Form_frmTreeView

Forms!frmMain!frmTreeView.SourceObject = frmTV


but it isn't working. Thanks!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.