| | | Join Date: Mar 2007 Location: Columbus, OH
Posts: 69
| |
My company is in the process of upgrading everyone to Access 2007. Since my machine was upgraded I've been highly frustrated with an apparent random behaviour byAccess that I can't understand. It involves databases that I created in Access 2002 (i.e. *.mdb files).
What happens is when I open a form that has the border style property set to 'Dialog', Access 2007 is correctly preserving the size of the form itself (i.e. if you look in the properties box, the form's width and height are correct) but Access is not remembering the size of the window the form is to be displayed in. Consequenly my form opens much bigger than they're supposed to (nearly taking up the entire workspace inside Access) and all of the controls on the form are in the upper left corner of the window. I'll switch to design view and re-size the window, save the form, and things will be fine for 'a while.' But then a few days later, the window size blows up again! Ug! I have lots of people you use the databases/forms that I've created and they're complaining about this behaviour, too.
Is there some new fuctionality or form property in Access 2007 that controls this behaviour? Is this a know bug with Access 2007? Any help would be appreciated.
Thanks,
sphinney
|  | | | Join Date: May 2007 Location: Florida
Posts: 1,915
| | | re: Access 2007 not retaining a form's window size
To the best of my knowledge this is not a bug in Access 2007 (see this link if you are interested in a reference source for bugs and problems converting to Access 2007 http://allenbrowne.com/Access2007.html )
I also don't think this is a problem with the main access window; rather I think the window is resizing because the form is resizing. You will not know for sure until you try the steps below:
Try the simple proposed solution first: Place this code in the Form's resize event as shown, then test your form: You must size your form in design view and save before you test. -
Private Sub Form_Resize()
-
DoCmd.Restore
-
End Sub
If the above step does not fix the problem, then follow the steps listed below from this link to an article by Mary Anne Richardson: http://articles.techrepublic.com.com...1-5756269.html
1. Open the form in design view and press [F4].
2. Under the format tab, change the value of MinMaxButtons property to None.
3. Change the value of Control Box to No.
4. Change the Border Style to Thin.
5. Set the value of Moveable to No.
6. When the form is opened, the user will not be able to use the border buttons to resize, minimize or maximize the form. With Moveable set to No, users will not be able to click and drag the border to reposition the window on the screen.
| | | | Join Date: Mar 2007 Location: Columbus, OH
Posts: 69
| | | re: Access 2007 not retaining a form's window size
Thanks for your response, puppydogbuddy. I tried the sample code you provided, but it did not fix my problem. I also aready turned off the MinMaxButtons and the ControlBox. Perhaps I didn't explain my problem very well.
My issue isn't with the main Access application window. Rather, it's INSIDE Access with the window around the form (if that makes any sense) . When in "Form View" the form/window opens way too large. In "Design View" the form inside the window area is the correct size, but the window is still too large.
I'm not sure how to post screen captures in a posting becuase it would illustrate my problem perfectly.
The problem is, even when I resize the window to fit more tightly around the form, in a day or two the window (without any user involvement) resizes itself and becomes way too large again. Sometimes the window is even bigger than the Access workspace>
I'm trying to figure out what causes this behavious and, better yet, how to get it to stop!
Thanks again for your help.
To the best of my knowledge this is not a bug in Access 2007 (see this link if you are interested in a reference source for bugs and problems converting to Access 2007 http://allenbrowne.com/Access2007.html )
I also don't think this is a problem with the main access window; rather I think the window is resizing because the form is resizing. You will not know for sure until you try the steps below:
Try the simple proposed solution first: Place this code in the Form's resize event as shown, then test your form: You must size your form in design view and save before you test. -
Private Sub Form_Resize()
-
DoCmd.Restore
-
End Sub
If the above step does not fix the problem, then follow the steps listed below from this link to an article by Mary Anne Richardson: http://articles.techrepublic.com.com...1-5756269.html
1. Open the form in design view and press [F4].
2. Under the format tab, change the value of MinMaxButtons property to None.
3. Change the value of Control Box to No.
4. Change the Border Style to Thin.
5. Set the value of Moveable to No.
6. When the form is opened, the user will not be able to use the border buttons to resize, minimize or maximize the form. With Moveable set to No, users will not be able to click and drag the border to reposition the window on the screen.
|  | | | Join Date: May 2007 Location: Florida
Posts: 1,915
| | | re: Access 2007 not retaining a form's window size
OK, then try this tip from www.aadconsulting.com
Replace subfrmtest with the actual name of your form. Let me know if it helped.
You can use the InsideHeight and InsideWidth properties of an Access form to dynamically resize controls at run-time. A form's Resize event as well as firing when a user resizes a form, also fires when a form is loaded.
For example, this code will resize a sub-form within a resized form:
Private Sub Form_Resize()
On Error GoTo ResizeError
'Turn off screen redraw
Application.Echo False
Me!subfrmTest.Height = Me.InsideHeight -30
Me!subfrmTest.Width = Me.InsideWidth - 30
'Turn screen redraw back on
Application.Echo False
Exit Sub
ResizeError:
' NB: Turn screen redraw back on if an error occurs!
On Error GoTo 0
Exit Sub
End Sub
| | | | Join Date: Aug 2008
Posts: 4
| | | re: Access 2007 not retaining a form's window size
Hi Sphinney,
Unfortunately my response won't be of any help to you, but I know exactly what problem you are talking about and I was wondering if you have found any workaround yet.
You can position, size and save the form (ctrl-S) and the user will be fine. However, if you roll out a new version that has been modified on a different computer, the behaviour will start over again.
Some windows even appear as small as can be, and the user can't do ANYthing with it but close it. Autosize, Autocenter, Auto adjust to screen, nothing helps.
Also typical behaviour: the first time the user opens the form (the window to be precize) it is ok, and the second or third time he opens the form, it sizes to ridiculous proportions.
I have installed every Office 2007 update available without success.
So, have you come any further with this?
Kind regards,
Arend Jan Nijenhuis
|  | | | Join Date: Jan 2008 Location: witness protection
Posts: 662
| | | re: Access 2007 not retaining a form's window size
Just watching this post. Do you guys still have the default Tabbed documents set or did you change it to Overlapping windows.
The default for AC2007 is Tab view.
To change it Choose the Access Options:Current Database:Overlapping Windows.
Let me know if that helps.
cheers,
| | | | Join Date: Aug 2008
Posts: 4
| | | re: Access 2007 not retaining a form's window size
Hi,
It doesn't matter weather you choose tabbed or overlapping. If you set it to tabbed, the behaviour is still a problem but appears to be slightly different.
When a popup form is to be displayed and Access is in tabbed mode, some windows size to small inusable objects. When Access is in overlapping mode, the forms tend to size to very large ugly windows, making no sence to the user.
Maybe the screen resolution is of any influence.
I keep trying.
| | | | Join Date: Aug 2008
Posts: 4
| | | re: Access 2007 not retaining a form's window size
Ok,
I have not found a solution yet but I just determined that it has nothing to do with Operating system or screen resolution.
I normalized and saved all window sizes on the client computer (Windows Vista business) so that the mdb behaved normally. I copied the mdb to my computer (Windows XP professional) and discovered that I had the exact same problem that the user had. Once you size and save the windows (ctrl-S), you're fine until you get a new copy of the mdb from the other computer.
Example of some behaviour after I copied the properly working mdb from the client computer to my computer:
I open a form:
DoCmd.OpenForm "dlg_get_product", , , , , acDialog
The window appears extremly small, I can't see anything on the form. All I can do is right-click on the 1 mm gray space I can reach, and choose "Close".
When I remove the acDialog parameter like this:
DoCmd.OpenForm "dlg_get_product"
the window appears way too large.
(This describes the different behaviour I mentioned earlier in a previous message when I thought that had something to do with the difference between Tabbed or Overlapping mode).
Once again, this mdb behaved perfectly fine on the client computer.
It's still driving me mad.
| | | | Join Date: Aug 2008
Posts: 4
| | | re: Access 2007 not retaining a form's window size
After spending WAY too much time on this problem, I finally solved it.
It turns out that if you leave the mdb in the format of a previous Access version, it does strange things to the windows if you open the mdb on a different computer. I guess the runtime conversion at startup treats the form objects differently.
I converted the mdb to the accdb (Access 2007) format, and everything was back to normal. However, you obviously can't do this if some of your users still use Access 2003.
Good luck.
Arend Jan Nijenhuis (NL)
| | | | Join Date: Mar 2007 Location: Columbus, OH
Posts: 69
| | | re: Access 2007 not retaining a form's window size
After spending WAY too much time on this problem, I finally solved it.
It turns out that if you leave the mdb in the format of a previous Access version, it does strange things to the windows if you open the mdb on a different computer. I guess the runtime conversion at startup treats the form objects differently.
I converted the mdb to the accdb (Access 2007) format, and everything was back to normal. However, you obviously can't do this if some of your users still use Access 2003.
Good luck.
Arend Jan Nijenhuis (NL)
aj100,
Sorry, I kind of lost track of this thread and didn't realize that others had kept it going. Otherwise I would have replied much sooner.
As it happens, I did stumble accross a solution a few weeks ago. And (as I should have expected from the beginning) it was something I was doing wrong. Or better put, something I didn't understand correctly.
At any rate, what worked for me was to make sure that the Auto Resize property for my form was set to "Yes". This will automatically resize the form's window (in Form View) to the size of the form's height and width properties.
Simple, isn't it!
Let me know if this works for you.
Regards,
sphinney
| | | | Join Date: Sep 2008
Posts: 1
| | | re: Access 2007 not retaining a form's window size
hey guys and gals..
I'm a new member on here whose been searching for an answer for the same problem. After about 20-25 minutes, i found a solution. Just open up the properties for the form,click the form tab, and set the option 'pop up' to yes..thats it...
Thanks and have a nice day/evening/night (which ever applies)
ALI A HAKIM
| | | | Join Date: Sep 2008
Posts: 1
| | | re: Access 2007 not retaining a form's window size
WORK-A-ROUND
I have had the same issue with popup and dialog forms in 2007. They work Ok for a while but then go to miniscule, especially when porting to another computer.
My work-a-round which is working so far is to re-sze them on load, setting the InsideWidth and InsideHeight attributes eg
Private Sub Form_Load()
Me.InsideWidth = 4300
Me.InsideHeight = 8000
End Sub
This is the ONLY way I can make it work so far and hopefully will keep them this size always now. . . .
| | | | Join Date: Oct 2008 Location: Yukon, OK
Posts: 1
| | | re: Access 2007 not retaining a form's window size
I had to do three things to fix this problem: (1) set Auto Resize = Yes, (2) set Pop Up = Yes, (3) set Modal = Yes
|  | | | |