Hi Morgan
I recently had a similiar problem where I wanted the subform to fill with
records with the new record entry row displayed at the bottom of the subform
regardless of how many records were in the subform. This is what I have
done:
Notes:
I placed the following code in the OnCurrent event of the main form
My subform is sized to display 12 records and the new record hence the No 13
in the code below
I have a control on the main form which I will call MyControl
Dim X As Integer
'Set focus to the subform
Me!MySubform.SetFocus
'Count the number of records in the subforms recordset - note you could
also include .MoveLast
X = Me!MySubform.Form.RecordsetClone.RecordCount
'If the subform has more then the display capacity then go to the new
record and then go back
'to the first record that will be at the top of the subform display then
go back to the new record
'so when you enter the subform you will go to the new record ready to
enter one
If X > 13 Then
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToRecord , , acGoTo, X - 10
DoCmd.GoToRecord , , acNewRec
Else
DoCmd.GoToRecord , , acNewRec
End If
'Go back to the main form and set the focus to the first control on the
main form
Me!MyControl.SetFocus
It may not be the most glorious way of doing it but at least I know it works
Hope this helps