I have this code from the 101 tech tips
I just want to be able to bind all text boxes
and a data grid


Public Sub ReadData(frm As Form, rc As Recordset)
Dim ctrl As Control
For Each ctrl In frm.Controls
If TypeOf ctrl Is TextBox Then
*If ctrl.DataField <> "" Then
'On Error Resume Next 'not all ctrls support databinding
ctrl = rc.Fields(ctrl.DataField)
End If
End If
Next

End Sub

However when goes into textbox type give me this error "Ado could not find the object in the collection corresponding to the name or ordinal reference requested by the application."

Any help would be appreciate it
krlos