Nick said:
I have a subform that by it self will open to the last record using Private
Sub Form_Load() DoCmd.GoToRecord Record:=acLast but when it is attached to
a
parent form it will not.
The subform loads before the parent form. Then, if it's linked to the main
form, when a new record becomes current on the the main form, the subform
will be filtered to match that record, and won't be at the last record.
You might try putting code in the main form's Current event to move the
subform to its last record. Something like this:
'----- start of example "air" code -----
Private Sub Form_Current()
With Me.Subform1.Form.Recordset
If .RecordCount <> 0 Then .MoveLast
End With
End Sub
'----- end of example code -----
Replace "Subform1" with the name of the subform control on your main form.
Note that the name of the subform control may not necessarily be the same as
the name of the form it displays.