Rocky Smolin
rockysmolin at bchacc.com
Mon May 16 16:29:06 CDT 2011
Yeah, tab forms and subforms sometimes don't resize right with the ADH code - although I've never found anything better. On tab and subform forms I'll set up variables for the size and location - sub-forms only seem to need height adjusted: Dim sglSubFormHeight As Single Dim sglTabPagesHeight As Single Dim sglTabPagesTop As Single Dim sglTabPagesWidth As Single Dim sglTabPagesLeft As Single I modified the resizing code to put the x and y resizing factors into global variable gsglFactorX and gsglFactorY. Then in the open event where I'm doing the resizing I save the values of those properties, resize, and then force the sizes of those objects : sglSubFormHeight = Me.subfrmWorkOrderAutomation_Create.Height sglTabPagesHeight = Me.TabPages.Height sglTabPagesTop = Me.TabPages.Top sglTabPagesWidth = Me.TabPages.Width sglTabPagesLeft = Me.TabPages.Left Application.Echo False Call adhScaleForm(Me, 800, 600, 96, 96, rctOriginal) If DLookup("TurnScreenResizingOff", "tblPreferences") = False Then Me.TabPages.Height = sglTabPagesHeight * gsglFactorY Me.TabPages.Top = sglTabPagesTop * gsglFactorY Me.TabPages.Width = sglTabPagesWidth * gsglFactorX Me.TabPages.Left = sglTabPagesLeft * gsglFactorX Me.subfrmWorkOrderAutomation_Create.Height = sglSubFormHeight * gsglFactorY End If HTH Rocky Smolin Beach Access Software 858-259-4334 Skype: rocky.smolin www.e-z-mrp.com www.bchacc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of cjlabs Sent: Monday, May 16, 2011 1:31 PM To: Access Developers Subject: [AccessD] another tab control issue I have a form with a tab control that has worked normally for years in Access 2000, 2002, 2003, and 2007. It has text boxes, list boxes, labels and buttons on each of the 7 pages on the tab control. I use ADH scaling code (been using it since Access97) and it has always worked fine. On this particular form in Access2010, the scaling is screwed up -- the tab control is much wider than it should be, so that the rest of the controls end up in the wrong location and some are off screen. I have other forms with similar tab controls in this database that scale correctly. If I do not use the scaling code, the form appears normal (just small). I've tried creating a new form and pasting the controls and code into it. I've tried decompilng. Has anyone seen this behavior? Any suggestions? TIA Carolyn Johnson St Louis MO -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com