473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access 2007 not retaining a form's window size

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
Jun 9 '08 #1
19 83585
puppydogbuddy
1,923 Expert 1GB
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.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Resize()
  2. DoCmd.Restore
  3. 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.
Jun 12 '08 #2
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.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Resize()
  2. DoCmd.Restore
  3. 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.
Jun 13 '08 #3
puppydogbuddy
1,923 Expert 1GB
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
Jun 13 '08 #4
aj100
4
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
Aug 7 '08 #5
mshmyob
904 Expert 512MB
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,
Aug 7 '08 #6
aj100
4
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.
Aug 8 '08 #7
aj100
4
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.
Aug 11 '08 #8
aj100
4
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)
Aug 11 '08 #9
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
Sep 18 '08 #10
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
Sep 19 '08 #11
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. . . .
Sep 26 '08 #12
Flynn
1
I had to do three things to fix this problem: (1) set Auto Resize = Yes, (2) set Pop Up = Yes, (3) set Modal = Yes
Oct 3 '08 #13
miss D
11
The pop up works fine with me!
Aug 23 '10 #14
munkee
374 256MB
I thought I might add something to this thread which is quite interesting.

Something to watch out for when working with your forms is after you have made any design changes, save the form but do not open the form back into form view from design view.

Instead close the form and open it up directly in to form view. Access can often alter the size of the form if you switch directly between form view -> design view -> form view.

This becomes especially apparent if when you right click on your form and switch it to design view, it loads as an unmaximised window. If you then alter the size of this unmaximised window by dragging the borders, you will be changing the size of your form if you then save and switch back to form view.

To ensure this does not happen when you go in to design view always ensure you click maximise and work from there.

If at present you have forms which are the wrong size and not reflecting how they are designed, open them up directly from the database window in design mode, maximise them, save and then close. Re-open the form and it will load up the correct design size (ensure autoresize is set to yes/true).
Aug 25 '10 #15
MEohMY
1
Hello,

I had the same issue. I changed the coordinates on the Gridlines to X=1 and Y=1 and that did it for me. The dafault is 24 and 24 made the form show up big.

Hope this helps.
Feb 9 '12 #16
AnyDave, your solution is the best. Thanks
Jul 12 '12 #17
Make the form popup and it will retain and remember it's size
Aug 10 '12 #18
twinnyfo
3,653 Expert Mod 2GB
I have found this to be a problem in cases where it is not a conversion from older to newer versions of Access. It is simply a "quirk" that, to my knowledge, no one has been able to provide a reasonable explanation of "why" it happens.

However, all solutions provided, at some point, seem to work more or less. As a standard on my DB, I hide my DB window, have all forms as Overlapping, Popup, Modal, AutoResize, AutoCenter all on; Borderstyle Thin and FitToScreen off. I also typically turn off all navigation controls and embed coded controls, unless I need them.

Since I have clamped down on the default form capabilities, it seems like I have had no problems at all.

One technique that seems to exasperate this problem is using the form in Continuous mode with a header and footer. These love to resize themselves, so I have completley gone away from them and gone to a main form with subforms in such cases.

I hope these few nuggets help.
Aug 10 '12 #19
zmbd
5,501 Expert Mod 4TB
THis is a known problem
http://msdn.microsoft.com/en-us/libr...ffice.12).aspx

I also have this happen when using reports...
I have a main form that upon first open does so correctly. If the user calls for a report... i have them open in a small window... all is good... however, if the user maximizes the report window, closes it, then when the main-menu form opens it also opens maximzied; however as the frontends are all mde when the user closes the FE and re-opens all is good.

Something I've had some success with is a tweek on #12 with the restore command and the standard pixel count:
Expand|Select|Wrap|Line Numbers
  1.    DoCmd.Restore
  2.    Me.InsideHeight = 2 * 1440
  3.    Me.InsideWidth = 5 * 1440
Wish this was my solution; however, Found this code while looking for a answer some time awhile ago ('07ish?)... I usually tweek the 2 and 5 to get the size I want then start the design.

-z
Aug 13 '12 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Lauren Quantrell | last post by:
Is there a way in code to freeze the size of the MS Access window or to prevent it from being sized? Thanks. lq
3
by: Mark 123 | last post by:
For those of you that are using the Access 2007 Beta, can I ask, comparing Access 97: What's the size of the runtime?
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
2
by: Wayne | last post by:
I've been having a click around Access 2007 this afternoon and have discovered some things that range from annoying to alarming. My Access 2003 menu bars, which I, like many others, use...
4
by: Peter | last post by:
Access 2007 optionally opens forms as tabs. There is an Access Option that controls this - Access Options Current Database Document Window Options Tabbed Documents. But how, from VBA, can I...
4
by: Neil | last post by:
Just found out that the Microsoft Rich Textbox does not support full text justification, since it's based on Version 1.0 of the RichEdit Window Class, and full text justification is only available...
3
by: cwoll | last post by:
Hi I need help. I have a ms access 2003 database that I would like to upgrade to ms access 2007. The first time I opened I had to fix a few references it wanted a DAO2535.TLB file witch I gave it,...
3
by: drtitus7759 | last post by:
I am using MS-Access 2003. I have a restricted applications for multiple users where when they start it up, it enters a series of menus and screens and does not let them at the various Access menus,...
5
by: sphinney | last post by:
Basic question: Does anyone know how to go about adding a control to an Access 2007 form that will allow viewing a Word 2007 document? Reason for asking: My office is about to receive 100+/-...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.