J
John S. Ford, MD
I'm working with Access 97 and have a form with an embedded subform (whose
AllowAdditions property is deliberately set to False). On the footer of the
subform there are two TextBoxes (txtCurrentRecord and txtTotalRecords). I
put the following code in the subform's OnOpen and Current events:
If Me.RecordsetClone.RecordCount = 0 Then
txtTotalRecords = 0
txtCurrentRecord = 0
End If
My thought was that if the MAIN form moves to a record for which there are
no child records in the subform, it would be reflected by the two TextBoxes.
But the subform seems to ignore this and the TextBox values are not updated
to 0 and 0. Apparently, this scenario doesn't trigger either of these
events. The subform disappears (except for the footer) because I've got
AllowAdditions set to false. How can I get those TextBoxes updated?
Am I picking the wrong event? Is there a better test for an empty form then
the one I'm using?
John
AllowAdditions property is deliberately set to False). On the footer of the
subform there are two TextBoxes (txtCurrentRecord and txtTotalRecords). I
put the following code in the subform's OnOpen and Current events:
If Me.RecordsetClone.RecordCount = 0 Then
txtTotalRecords = 0
txtCurrentRecord = 0
End If
My thought was that if the MAIN form moves to a record for which there are
no child records in the subform, it would be reflected by the two TextBoxes.
But the subform seems to ignore this and the TextBox values are not updated
to 0 and 0. Apparently, this scenario doesn't trigger either of these
events. The subform disappears (except for the footer) because I've got
AllowAdditions set to false. How can I get those TextBoxes updated?
Am I picking the wrong event? Is there a better test for an empty form then
the one I'm using?
John