dbTalk Databases Forums  

Slow .Form.Section(acFooter).Visible = True

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


Discuss Slow .Form.Section(acFooter).Visible = True in the comp.databases.ms-access forum.



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

Default Slow .Form.Section(acFooter).Visible = True - 12-09-2010 , 09:22 AM






Confusing behavior toggling the footer visible. Before I split the
database this worked very quickly, now it disappears fast but when I
make it visible it's really slow. I suspected it was requerying the
backend everytime it became visible since there's a subform in the
footer, but even with sourceobject = "" it's slow just the same.

When I trace it with the debugger it just sits on the visible = true
line for a few seconds, so it's definitely at that point where it
lags.

Since it may still be querying the db for some reason behind the
scenes, is there a way to toggle the connection to the backend so
maybe I can prevent this?


Thanks

Reply With Quote
  #2  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: Slow .Form.Section(acFooter).Visible = True - 12-09-2010 , 10:53 AM






My workaround was to toggle the footer and it's subform height - but
this starts another bug - when the subform is reduced to 0 height,
Access begins taking 50% processor time!

To get around this I reduce to height 49, which Access interprets to
99 (?) then I test for less then 100 to toggle:

If Forms!frmmain!frmFormView.Form.Section(acFooter).H eight > 100 Then
' not close
Forms!frmmain.Form.txtFocus.SetFocus
TempVars!lFootHeight = Forms!frmmain!frmFormView.Form(strSF).Height
Forms!frmmain!frmFormView.Form(strSF).Height = 49
Forms!frmmain!frmFormView.Form.Section(acFooter).H eight = 49
'Forms!frmmain!frmFormView.Form.Section(acFooter). Visible = False
Else
' not open
Forms!frmmain!frmFormView.Form(strSF).Height = TempVars!lFootHeight
Forms!frmmain!frmFormView.Form.Section(acFooter).H eight = TempVars!
lFootHeight
'Forms!frmmain!frmFormView.Form.Section(acFooter). Visible = True
End If

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.