Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO equivilent to Set fld = rst.Fields(strFieldName)???

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
dim fld as Field 'etc
Set fld = rsQdf.Fields(strFieldName)

Above is the syntax for setting the fld object to a specific field in DAO.

How is this done in using ADO? I have looked at the help file, but it only suggests enumerating through the entire collection of fields in a recordset, which I do not want to do. Instead I want to set the fld object to a specific object...


James Goodman
 

'- Value is default can be omitted
set fld = rsQdf.Fields("yourFieldNameinCollection").Value

'- alternative
'- cnt = relative position of field in fields collection
set fld = rsQdf.Fields(cnt).Value
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top