Hey All,
I am currently working on a form which has text boxes that I want to maximize dependent on the window size. I have figured out the resizing side of things through some vb code but am having a issue were one of the subforms seems to leave the proper layout position. If I go to layout view and back to form view it seems to fix the issue but i can't find a vb command equivalent to those steps. I have attached the subform position before and after switching views:
The code I am using to resize other elements of the page is:
Code:
Private Sub Form_Resize()
Dim WorkingPageHeight, WorkingPageWidth, HistHeight, PoAHeight, RevHeight As Integer
WorkingPageHeight = Me.WindowHeight - 5000
WorkingPageWidth = Me.WindowWidth - 8750
HistHeight = WorkingPageHeight * 0.26
PoAHeight = WorkingPageHeight * 0.56
RevHeight = WorkingPageHeight * 0.18
Me.HistoryText.Height = HistHeight
Me.HistoryText.Width = WorkingPageWidth
Me.PlanOfActionText.Height = PoAHeight
Me.ReviewerNotesText.Height = RevHeight
Me.ProblemReport.Width = Me.WindowWidth - 500
Me.Repaint
End Sub
Is there a command that will properly position the subform in the right location?