Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem gotorecord in subform

Status
Not open for further replies.

DriesG

Programmer
Jul 2, 2003
16
0
0
BE
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
 
How are ya DriesG . . . .

Try this:
Code:
[blue] Dim rst as Recordset
Set rst=Me.RecordsetClone
rst.MoveFirst
Me.Bookmark = rst.Bookmark[/blue]

cal.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top