I have an access form with a web browser control and I'm trying to enable it to resize with the form. The code causes the web browser control to shink and grow to the exact dimensions of the form, and leaves space at the top for the rest of the access form...
The code seems to work fine during the event; it resizes to the exact dimensions. Problem is, after it resizes, if I try to enter text INTO the web browser control, or I click on the record selector at the bottom, the web browser control immediately expands over the entire access form and covers the portion at the top.
Does anyone know how to correct it?
Thanks,
-Adam
Code:
Private Sub Form_Resize() On Error GoTo ResizeError 'resize the browser object with the form 'Turn off screen redraw Dim dblHeaderHeight As Double dblHeaderHeight = 1.5833 Application.Echo False Me!wbbWebsite.Height = Me.InsideHeight - dblHeaderHeight Me!wbbWebsite.Width = Me.InsideWidth 'Turn screen redraw back on Application.Echo True Exit Sub ResizeError: ' NB: Turn screen redraw back on if an error occurs! On Error GoTo 0 End Sub
Does anyone know how to correct it?
Thanks,
-Adam
Comment