What does this mean?

B

Bob

Private Sub Form_Got()
Me.subHorseDetailsChild.Form.Recordset.MoveLast
End Sub

Thanks for any Help!....Bob
 
D

Douglas J. Steele

That code must be contained in a module associated with a form that has a
subform on it. The name of the subform control is subHorseDetailsChild
(depending on how the subform was added to the parent form, it's possible
that the form that's used as the subform may be named something else).

That particular instruction is saying to move to the last row in the
recordset of the subform.
 
S

Scott McDaniel

Private Sub Form_Got()
Me.subHorseDetailsChild.Form.Recordset.MoveLast
End Sub

I assume you mean:

Private Sub Form_GotFocus()

as there is no "Got" event of a form ...

Assuming it's the GotFocus event, this means that whenever your form receives the Focus (you click on it, for example),
the data in the subHorseDetailsChild subform will move to the last record. You need to be careful with GotFocus, since
it doesn't always fire. This is from the MSDN onlilne reference:

"A form can receive the focus only if it has no controls or if all visible controls are disabled. If a form contains any
visible, enabled controls, the GotFocus event for the form doesn't occur."

So unless this form has no controls Visible, or unless all visible controls are disabled, there is no guarantee that
your code will fire.

Here's a link to the GotFocus reference:
http://msdn2.microsoft.com/en-us/library/aa165410(office.10).aspx

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Top