problem setting a size of the form

maisam

Registered User.
Local time
Today, 05:49
Joined
Oct 25, 2005
Messages
15
Hi guys

In my database I have a main form and depending on the options chosen on this form other forms will pop up on the screen.

I want the main form to cover the whole page therefore in the On Open event I have used the Docmd.Maximize function. The problem is that after this point all the other forms will maximize once they are open! How can I stop the pop up forms from maximizing and make them open in a specific size? What code can I use for this?

Thanks
 
Have you tried setting the Auto Resize property off?
 
On close event...

Docmd.Restore
 
Yes. The Auto Resize is set to 'NO' in properties but it still maximizes once it is opened! Tricky!
 
Kempes,

Do you mean on Close event of the form that i want to keep its original size, or the close event of the previous form which it is set to maximize on the open event?

the thing is i don't want the maximized form to close once the second form is opened! the second form is basically a pop up and you still need to see the first form!
 
maisam said:
Hi guys

In my database I have a main form and depending on the options chosen on this form other forms will pop up on the screen.

I want the main form to cover the whole page therefore in the On Open event I have used the Docmd.Maximize function. The problem is that after this point all the other forms will maximize once they are open! How can I stop the pop up forms from maximizing and make them open in a specific size? What code can I use for this?

Thanks

Did you sort this problem out as i am have the same diffculies.

Alastair
 
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

Here is how I set [force] the size of my forms...

Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
    
    'just for testing
    MsgBox "InsideHeight = " & InsideHeight & vbCrLf & vbLf & "InsideWidth = " & InsideWidth
    
    InsideHeight = 5450 'twips is the unit of measurement
    InsideWidth = 7870
    
Exit_Form_Open:
    Exit Sub
    
Err_Form_Open:
    MsgBox Err.Number & " - " & Err.Description
    Resume Exit_Form_Open
    
End Sub
 

Users who are viewing this thread

Back
Top Bottom