Brad,
Before we had split forms, I did something similar to what you are talking
about, but it required a lot of code. Basically, here is what I did.
I put two subforms on my main form, the one on the top was in form view, the
one on the bottom was in datasheet view.
I added a rectangle between the two subforms that ran the width of the form,
and was about .05" high. I used the rectangle because it had mouse events
associated with it.
I then added code to the forms code module:
1. Declared variable dblStartY as Double in the general section
2. Added code to the MouseDown, MouseUp and MouseMove events of the
divider. The following code code is from a sample I just did where I put two
boxes (box_top and box_bottom) on my form.
Private Sub box_Divider_MouseDown(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
'need to set this to identify the amount of shift
dblStartY = Y
End Sub
Private Sub box_Divider_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Dim dblDelta As Double
If dblStartY = 0 Then Exit Sub
dblDelta = (dblStartY - Y)
'These are arbitrary values that limit the sizing.
'dividing line can only move within the 1" and 3" vertical range
'this code moves the divider, grows/shrinks the top box, and moves
'the top and adjusts the height of the bottom box accordingly
If (Me.box_Divider.Top - dblDelta) / 1440 > 1 And _
(Me.box_Divider.Top - dblDelta) / 1440 < 3 Then
Me.box_Top.Height = Me.box_Top.Height - dblDelta
Me.box_Divider.Top = Me.box_Divider.Top - dblDelta
Me.box_Bottom.Top = Me.box_Bottom.Top - dblDelta
Me.box_Bottom.Height = Me.box_Bottom.Height + dblDelta
End If
End Sub
Private Sub box_Divider_MouseUp(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
'sets dblStartY to zero so that the divider doesn't
'move every time you slide your mouse over it
dblStartY = 0
End Sub
With this method, you will have to add code to the current event of both
subforms so that the record with the focus in the other subform matches the
record with the focus in the current form.
Hope this helps.