Selected subform record becomes unselected after code runs

M

M Skabialka

After figuring out that you can't use a Split Form in Access 2007 as a
subform, I went back to the old way of adding a datasheet view subform to my
subform. (main, subfrm, subsubfrm). If the user clicks on a record selector
on the subsubfrm datasheet, the subfrm goes to that record. However for
some reason the record highlighted in the subsubfrm datasheet is no longer
highlighted - it goes back to the first record. But if I put in a break
point and step through the code, when it is done the selected record is
still highlighted. The code is simple, nothing else happens on either form,
on current or anything...

Dim tempID As Integer
tempID = Me!ID
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(tempID, 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Why would my subsubfrm go back to the first record if I don't step through
the code, but remain on the selected record if I do step though?

Mich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top