G
Guest
I have an unbound form named fMain01. It has a subform object named
subfrmCOA. The subfrmCOA SourceObject is form fSubData01 whose recordsource
is a query qCOA001. subfrmCOA on fMain01 has no Linked Child Fields and no
Linked Master Fields.
Issue: I want to create a command button that when I click it the record
pointer in subfrmCOA will go to the first record. Example is lets say I have
scrolled down to record 300 and click on it. When I click the command button
then subfrmCOA should go back to it's record one. Note: I do not want to
use the navigation buttons for this. I need control outside the navigation
buttons.
It was suggested to me to do the following on the [EventProcedure] on the
OnClick event of a Command Button on form fMain001:
Me.subfrmCOA.Form.Recordset.MoveFirst
but when I do this I get an error: Application-defined or Object-defined
error.
Can anyone please help me with this?
Thank you,
Steven
PS: If it helps at all in a solution I did later out of frustration add an
ID field in the subform that returns a records line number in the subform.
I got this code out of the MSKnowledgeBase about how to add line numbers to
your subform. I just mention it in case the solution goes in this direction.
Thanks again.
subfrmCOA. The subfrmCOA SourceObject is form fSubData01 whose recordsource
is a query qCOA001. subfrmCOA on fMain01 has no Linked Child Fields and no
Linked Master Fields.
Issue: I want to create a command button that when I click it the record
pointer in subfrmCOA will go to the first record. Example is lets say I have
scrolled down to record 300 and click on it. When I click the command button
then subfrmCOA should go back to it's record one. Note: I do not want to
use the navigation buttons for this. I need control outside the navigation
buttons.
It was suggested to me to do the following on the [EventProcedure] on the
OnClick event of a Command Button on form fMain001:
Me.subfrmCOA.Form.Recordset.MoveFirst
but when I do this I get an error: Application-defined or Object-defined
error.
Can anyone please help me with this?
Thank you,
Steven
PS: If it helps at all in a solution I did later out of frustration add an
ID field in the subform that returns a records line number in the subform.
I got this code out of the MSKnowledgeBase about how to add line numbers to
your subform. I just mention it in case the solution goes in this direction.
Thanks again.