subform used for changing mainform record

Hello.  I have a main form that has a tabcontrol on it.  One of the tabs has 
a subform on it that will list the many of the mainform's one.  This is a 
parent/child hierarchy set up.  So the parents and children are all in one 
table.  A parent can also be a child and a child can also be a parent.  
Anyway, below is the code that I originally used for making the change.  Now 
it does not and I do not see why.  The button that I am using is inside the 
subform that when used takes and changes the mainform to the selected record 
and the subform as well. The txtChangeRequestID is the PK field in the 
subform that is the PK field on the main form.

        Dim frm As Form
        Set frm = Me.Parent
        With frm.RecordsetClone
            .FindFirst "ChangeRequestID=" & Me!txtChangeRequestID
            If Not .NoMatch Then frm.Bookmark = .Bookmark
        End With

Can someone please take a look at this?  Also, if someone has a better idea, 
I am open for suggestions.

12/14/2009 4:16:02 PM
access.formscoding 7493 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 3


Similar Artilces: