Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enlarging Forms Footer and Subform is freezing database

Status
Not open for further replies.

oxicottin

Programmer
Jun 20, 2008
353
0
0
US
Hello, I have a form (frm_YearCalendar) that has two subforms in the footer and I need to enlarge the bottom one after I enlarge the footer. I do not have any issues with 2010 and 2013 Access but 2007 it freezes the database when I click the button to enlarge it.

At first when I clicked the button to enlarge the footer it froze so I tried a diferent code to do that and it works now. I used the below code to fix that:

Me.FormFooter.Height

and replace with

Me.Section(acFooter).Height


I now cant get it not to stop freezing when I try to enlarge the subform using the code below. I have the two lines commented out that are doing it. Any sugestions?

Private Sub cmdresize_Click()
If Me.Section(acFooter).Height = 4188 Then
Me.Section(acFooter).Height = 7700
'Me.frm_AbsenteeismPolicySummarySub.Height = 6000
Else
'Me.frm_AbsenteeismPolicySummarySub.Height = 2000
Me.Section(acFooter).Height = 4188
End If
End Sub





Thanks,
SoggyCashew.....
 
2 thoughts...

Decompile your database (command line switch: /decompile), compact and repaire and recompile everything in Access 2007...

If you don't have luck there, I'd use docmd.Echo to turn screen updates on and off before and after changing the section height. I think the IDE pops up on error if you don't have error handling in 2007 and echo is off... In some older versions, nothing updates at all and you practically have to end Access because it is hung and invisible.

I hope one of those helps out.
 
Lemeid, I have decompiled and compacted a million times so that's not it. In the morning when I get to work I will try to add docmd.Echo like below and post results.


Private Sub cmdresize_Click()
If Me.Section(acFooter).Height = 4188 Then
Me.Section(acFooter).Height = 7700
docmd.Echo
Me.frm_AbsenteeismPolicySummarySub.Height = 6000
Else
docmd.Echo
Me.frm_AbsenteeismPolicySummarySub.Height = 2000
Me.Section(acFooter).Height = 4188
End If
End Sub

Thanks,
SoggyCashew.....
 
Ok, Tried it before and after and I get a argument not optional error. Sugestions?

Thanks,
SoggyCashew.....
 
The correst syntax requires a "True" or "False'... ie. Docmd.Echo true
 
Code:
Private Sub cmdresize_Click()
     docmd.echo False 'Turn Screen updating off
     If Me.Section(acFooter).Height = 4188 Then
          Me.Section(acFooter).Height = 7700
          'Me.frm_AbsenteeismPolicySummarySub.Height = 6000
     Else
          'Me.frm_AbsenteeismPolicySummarySub.Height = 2000
          Me.Section(acFooter).Height = 4188
     End If
     docmd.echo True  'Turn Screen updating on   
End Sub
[code]
 
lameid, I don't have 2007 at home just just at work, I have 2010,2013 at home but all code works fine as it is. What exactly does the echo do? I tried reading about it but nothing I found explained what it does.

Thanks,
SoggyCashew.....
 
I forgot I bought 2007 and 2003 as well, Im installing 2007 access now to test, but I still don't know what echo does. Thanks!

Thanks,
SoggyCashew.....
 
lameid said:
use docmd.Echo to turn screen updates on and off

It turns screen drawing on and off. This used to be a big deal for performance. My thinking is that there may be something funky about the system in hardware or drivers that turning updates off may help.
 
Well i tried it last night after installing the 2007 access and it doing the same thing but works fine in 2010 and 2013 versions...

Thanks,
SoggyCashew.....
 
I've let this stew for a few days and I still have no other kitchen sink ideas...

Unfortunately I don't have Access 2007 anywhere to play with this issue.

I am assuming Access 2007 is fully patched on the erroring machines.

So the only real option there seems to be is to upgrade the Access client... The Access runtime is free.

I don't like that answer. The only thing I can think of is to try setting the section height from the immediate window various ways and see if that is at all illuminating.
 
Well its a problem because its in my work pc and I dont see an upgrade any time in the future nor do i see an admin helping due to tec support cuts so im unabke to update anythung pertaining to windows. I will continue to try different things. I just cant understand why 2007 it wont work. Thanks!

Thanks,
SoggyCashew.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top