Hello all,
I have a form with a subform(1) in single record view.
In this subform(1) there is another subform(2) in datasheet view. On this subform(2) there is a button to tell the subform(2)to go to record "acfirst".
When I'm for example on record 2 in subform(1) and I click the button I would like subform(2) to go to record acfirst.
Record 2 in subform(1) should stay active.
The problem is that when I press the button, not only subform(2) goes to the first record, but also subform(1).
Subform(1) should stay on its active record.
I tried next code:
subform(2).setfocus
docmd.gotorecord,,acfirst.
or
suform(2).form.setfocus
docmd.gotorecord,,acfirst.
This doesn't work.
Any ideas how to do is?
many thanks.
Dries
I have a form with a subform(1) in single record view.
In this subform(1) there is another subform(2) in datasheet view. On this subform(2) there is a button to tell the subform(2)to go to record "acfirst".
When I'm for example on record 2 in subform(1) and I click the button I would like subform(2) to go to record acfirst.
Record 2 in subform(1) should stay active.
The problem is that when I press the button, not only subform(2) goes to the first record, but also subform(1).
Subform(1) should stay on its active record.
I tried next code:
subform(2).setfocus
docmd.gotorecord,,acfirst.
or
suform(2).form.setfocus
docmd.gotorecord,,acfirst.
This doesn't work.
Any ideas how to do is?
many thanks.
Dries