D
Deb H
I have a mainform named Registrations with a subform named Childsubform. I am
trying to create an unbound form named FindChild that I will use to find a
record on the subform. I have an unbound listbox named List2 that displays
all the records from the record source of the subform and a showrecord2
button. This is the code I have written for the click event on the
ShowRecord2.
Private Sub ShowRecord2_Click()
'Find the selected record and then close the dialog box
Dim rst As DAO.Recordset
Set rst = Forms![Childsubform].RecordsetClone
DoCmd.OpenForm "Registrations", acNormal
rst.Forms![Registrations]![Childsubform].FindFirst "ChildID = " & List2
'Set the form's bookmark property to move to the record
Forms![Childsubform].Bookmark = rst.Bookmark
DoCmd.Close acForm, "FindChild"
End Sub
When I use the form to show a record, I get a compile error: method or data
member not found. Thanks in advance for any help you can give me.
trying to create an unbound form named FindChild that I will use to find a
record on the subform. I have an unbound listbox named List2 that displays
all the records from the record source of the subform and a showrecord2
button. This is the code I have written for the click event on the
ShowRecord2.
Private Sub ShowRecord2_Click()
'Find the selected record and then close the dialog box
Dim rst As DAO.Recordset
Set rst = Forms![Childsubform].RecordsetClone
DoCmd.OpenForm "Registrations", acNormal
rst.Forms![Registrations]![Childsubform].FindFirst "ChildID = " & List2
'Set the form's bookmark property to move to the record
Forms![Childsubform].Bookmark = rst.Bookmark
DoCmd.Close acForm, "FindChild"
End Sub
When I use the form to show a record, I get a compile error: method or data
member not found. Thanks in advance for any help you can give me.