form opens at very tiny size

srobbins

Registered User.
Local time
Today, 10:03
Joined
Jun 25, 2006
Messages
11
This is a problem I have in several applications.

From button on a form, I open another form, like this:

DoCmd.OpenForm "Form2", , , , , acDialog

Form2 presents a list of records. The user selects a record then clicks an OK button. The logic on the OK button gets the selected record's ID and stores it in a hidden field on the first form.

The logic all works fine. The problem is that Form2 often opens at an extremely small size, way too small to be usable, both width and height very tiny. I can't resize it (even though Border Style property was set to "resizable"). The only thing to do is to close Form2 via a keyboard shortcut. If I then look at it in the design environment, it looks fine, so I re-save it and try again. This time it opens at the normal size, but the very next time it reverts to the tiny size.

Has anyone else seen this behavior? I'm guessing this has something to do with opening the form as a dialog (which I need to do).

Thanks for any help.
 
I'm not using Vista, but I did find a work-around problem with some resizing code.

First of all, I found that the Auto Resize property has something to do with this. I changed it from No to Yes, and the behavior changed somewhat. With Auto Resize set to yes, the width of Form2 was correct, but the height still was very small, no matter how many records were there. I then added the following brute force code to the OnLoad event:
DoCmd.MoveSize , , , 4000

I'm not happy with this solution, but it solves the problem for now. Guess I should make sure it works with Vista.
 

Users who are viewing this thread

Back
Top Bottom