G
Guest
Hi,
This method change the hieght and Width of the sub form in the form calling
in
form resize event.
I don't know what is 6615 parameter meens
ctrl.height = fHight - 6615 + DEF_H
Code Snippet
Sub sub_forms_hieght(frm As Form)
Dim FLeft As Long
Dim FTop As Long
Dim fHight As Long
Dim FWidth As Long
Dim ctrl As Control
Const DEF_H = 3850
Const DEF_W = 7335
Call GetFormDimensions(frm, FLeft, FTop, FWidth, fHight)
If (FWidth < 3000) Or (fHight < 3000) Then
For Each ctrl In frm.Controls
If ctrl.ControlType = acSubform Then
DoCmd.Beep
DoCmd.MoveSize 1060, 1510, 7890, 6615
ctrl.Width= DEF_W
ctrl.height = DEF_H
End If
Next
frm.Refresh
Exit Sub
End If
For Each ctrl In frm.Controls
If ctrl.ControlType = acSubform Then
ctrl.height = fHight - 6615 + DEF_H
ctrl.Width = FWidth - 7890 + DEF_W
End If
Next
End Sub
VBA + Access.
Thank's,
Yael
This method change the hieght and Width of the sub form in the form calling
in
form resize event.
I don't know what is 6615 parameter meens
ctrl.height = fHight - 6615 + DEF_H
Code Snippet
Sub sub_forms_hieght(frm As Form)
Dim FLeft As Long
Dim FTop As Long
Dim fHight As Long
Dim FWidth As Long
Dim ctrl As Control
Const DEF_H = 3850
Const DEF_W = 7335
Call GetFormDimensions(frm, FLeft, FTop, FWidth, fHight)
If (FWidth < 3000) Or (fHight < 3000) Then
For Each ctrl In frm.Controls
If ctrl.ControlType = acSubform Then
DoCmd.Beep
DoCmd.MoveSize 1060, 1510, 7890, 6615
ctrl.Width= DEF_W
ctrl.height = DEF_H
End If
Next
frm.Refresh
Exit Sub
End If
For Each ctrl In frm.Controls
If ctrl.ControlType = acSubform Then
ctrl.height = fHight - 6615 + DEF_H
ctrl.Width = FWidth - 7890 + DEF_W
End If
Next
End Sub
VBA + Access.
Thank's,
Yael