If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Selected subform record becomes unselected after code runs
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 |
Thread Tools | |
Display Modes | |
|
|