Public Const grdform As String = "form1"
Public Const cols As Byte = 6
Public frmgrd(cols) As Form
Private Type rect
l As Long
t As Long
h As Long
w As Long
End Type
Private r As rect
Public Function GenGrd()
Dim f As Form, i As Byte
For i = 0 To cols
Set frmgrd(i) = Nothing
Next
DoCmd.OpenForm grdform
DoCmd.Maximize
Set frmgrd(0) = Forms(grdform)
r.w = frmgrd(0).WindowWidth / cols
r.h = frmgrd(0).WindowHeight / 2
DoCmd.Restore
For i = 0 To cols
If frmgrd(i) Is Nothing Then Set frmgrd(i) = New Form_Form1
frmfmt frmgrd(i), r.w * i, 0, r.w, r.h
Next
End Function
Private Sub frmfmt(f As Form, l As Long, t As Long, w As Long, h As Long)
f.Move l, t, w, h
f.ControlBox = True
f.ScrollBars = 0
f.RecordSelectors = False
f.NavigationButtons = False
f.Visible = True
'f.BorderStyle = 0 'design view only
End Sub