gabber4858
Technical User
I have a main form called Program Detail with a subform called Program Item Details Sub Form. I created 2 buttons in the main form to either check or uncheck the "Print" field in the subform. I did have this working, but it checked or unchecked all the records in the Program Item Details Table.
I am now trying to get the code to only check/uncheck the Print box for the current Program in the mainform. This is what I have been able to piece together so far:
Private Sub Command34_Click()
Dim rs As DAO.Recordset
Set rs = Forms![Program Detail]![Program Item Details Sub Form].Form![Print].RecordsetClone
Do While Not rs.EOF
rs.Edit
rs!Print = True
rs.Update
rs.MoveNext
Loop
Set rs = Nothing
End Sub
When I click the button, I get an error 2465 .....can;t find the field "Program Item Details Sub Form".
My questions are: What am I doing wrong and how close am I? Any help would be greatly appreciated!
I am now trying to get the code to only check/uncheck the Print box for the current Program in the mainform. This is what I have been able to piece together so far:
Private Sub Command34_Click()
Dim rs As DAO.Recordset
Set rs = Forms![Program Detail]![Program Item Details Sub Form].Form![Print].RecordsetClone
Do While Not rs.EOF
rs.Edit
rs!Print = True
rs.Update
rs.MoveNext
Loop
Set rs = Nothing
End Sub
When I click the button, I get an error 2465 .....can;t find the field "Program Item Details Sub Form".
My questions are: What am I doing wrong and how close am I? Any help would be greatly appreciated!