J
J Welsby
Trying to 'see' the values in controls in a subform. Have created some code
like the following:
Dim ctlC As Control
For Each ctlC In frm.Controls
If TypeOf ctlC Is SubForm Then
MsgBox ctlC.Name
End If
Next ctlC
This code is attached to the close event of a form and will return (via the
msgbox) the names of each of the subforms on the form.
But how do I get it to return the values in text boxes, combo boxes etc. on
each subform? Am having difficulty in creating this code
Pls be gentle - newbie to VBA! Thanks
like the following:
Dim ctlC As Control
For Each ctlC In frm.Controls
If TypeOf ctlC Is SubForm Then
MsgBox ctlC.Name
End If
Next ctlC
This code is attached to the close event of a form and will return (via the
msgbox) the names of each of the subforms on the form.
But how do I get it to return the values in text boxes, combo boxes etc. on
each subform? Am having difficulty in creating this code
Pls be gentle - newbie to VBA! Thanks