Ian_M
March 3rd, 2005, 01:17 PM
Hi:
I'm converting an application from DAO to ADO and I'm having a problem with a function that worked fine in DAO but not in ADO. Here it is:
Function PopulateForm(frmAny As Form, rstAny As Recordset)
If rstAny.EOF Then
gbPopulateForm = False
Else
Dim fld As Field
For Each fld In rstAny.Fields
frmAny(fld.Name) = fld
Next fld
gbPopulateForm = True
End If
End Function
I pass a formname and a recordset to this function and use it to populate the form - it seems that my recordset does not exist in ADO anymore - how do I get the recordset to persist so I can use it in the function?
Thanks,
Ian
I'm converting an application from DAO to ADO and I'm having a problem with a function that worked fine in DAO but not in ADO. Here it is:
Function PopulateForm(frmAny As Form, rstAny As Recordset)
If rstAny.EOF Then
gbPopulateForm = False
Else
Dim fld As Field
For Each fld In rstAny.Fields
frmAny(fld.Name) = fld
Next fld
gbPopulateForm = True
End If
End Function
I pass a formname and a recordset to this function and use it to populate the form - it seems that my recordset does not exist in ADO anymore - how do I get the recordset to persist so I can use it in the function?
Thanks,
Ian