I'm not sure that I understand the question. Do you mean to check whether a field exists in a recordset??
If the above interpretation is correct, then the following code can be used:
[tt]
YourFieldName = "YourField"
YourFieldFound = False
For Each F In RS.Fields
If F.Name = YourFieldName Then
YourFieldFound = True
Exit For
End If
Next F
[/tt]
The above assumes that the recordset has already been successfully opened; Replace "YourField" above, as appropriate. Better still, turn the above code into a simple function, and pass the recordset and field name as parameters to the function.
I hope this answers the question; otherwise provide more info about what you're looking for.
Cheers,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)