form size are changing when opened as a dialo box ? (1 Viewer)

saleemMSMS

Registered User.
Local time
Today, 07:04
Joined
Aug 12, 2009
Messages
92
first of all; i'm using Access 2007
and the forms are not being opened in the default "tab format"
i changed it in a way that the forms are being loaded in the overlapping manner.

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.

i tried everything mentioned in many web sites
changed the Me.InsideHeight attribute in the load event
did (1) set Auto Resize = Yes, (2) set Pop Up = Yes, (3) set Modal = Yes
added docmd.restore in the onresize event

but none worked..

i mean all the 3 solutions work well until i do a compact/repair database. once you do the compact/repair databse process, again the forms behave in that unusual manner...
please help me in this matter
 

Trevor G

Registered User.
Local time
Today, 01:04
Joined
Oct 1, 2009
Messages
2,341
Look to use a macro that will do movesize set the size you want and then add the macro to the form open event. That should do the trick.

Trevor
 

SOS

Registered Lunatic
Local time
Yesterday, 17:04
Joined
Aug 27, 2008
Messages
3,517
If you want it a specific size do NOT set AutoResize to YES. Set it to NO, go into the form in DESIGN view and size it the way you want and then click the SAVE button. It should then open the way you want.
 

vbaInet

AWF VIP
Local time
Today, 01:04
Joined
Jan 22, 2010
Messages
26,374
Also if you want the Tabbed window style, click the Office button at the top left corner (looks like a circle and when clicked a drop-down appears), click Access Options at the bottom of the dialog, click Current Database to the left of the pop up window, and under Document Window Options tick Display Document Tabs. OK that, close and reopen your db.
 

SOS

Registered Lunatic
Local time
Yesterday, 17:04
Joined
Aug 27, 2008
Messages
3,517
Also if you want the Tabbed window style, click the Office button at the top left corner (looks like a circle and when clicked a drop-down appears), click Access Options at the bottom of the dialog, click Current Database to the left of the pop up window, and under Document Window Options tick Display Document Tabs. OK that, close and reopen your db.

That is the default for new 2007 databases by the way. But, just an additional point of information. Do not open the form as POPUP if you want it to work with the tab format. It will open as a separate sized form if you specify it to open as popup.
 

Users who are viewing this thread

Top Bottom