Ashleyjp1985
Registered User.
- Local time
- Today, 11:32
- Joined
- Jul 6, 2011
- Messages
- 22
Hi,
i have a form with a nested subform that are opened from a mainform.
When the user selects a specific record on the main form i want the form to open and the subform to display the selected record. I am using the below code on the load event of the form:
when i first run it it works! the nested sub from displays the correct record and did so for the next few that i tried. There were 10 related records in this example and after number 4 it stopped working. When the form opened the subform very briefly went to the correct record then jumped to add a new record. Any help????
Dim rs As Object
Dim lngBookmark As Long
lngBookmark = Me.SIID
Set rs = Me.SubformPopformQCustomerSI.Form.RecordsetClone
rs.FindFirst "SIID = " & lngBookmark
Me.SubformPopformQCustomerSI.Form.Bookmark = rs.Bookmark
Set rs = Nothing
i have a form with a nested subform that are opened from a mainform.
When the user selects a specific record on the main form i want the form to open and the subform to display the selected record. I am using the below code on the load event of the form:
when i first run it it works! the nested sub from displays the correct record and did so for the next few that i tried. There were 10 related records in this example and after number 4 it stopped working. When the form opened the subform very briefly went to the correct record then jumped to add a new record. Any help????
Dim rs As Object
Dim lngBookmark As Long
lngBookmark = Me.SIID
Set rs = Me.SubformPopformQCustomerSI.Form.RecordsetClone
rs.FindFirst "SIID = " & lngBookmark
Me.SubformPopformQCustomerSI.Form.Bookmark = rs.Bookmark
Set rs = Nothing