Automated Search

mugman17

Registered User.
Local time
Today, 09:12
Joined
Nov 17, 2000
Messages
110
Does anyone know of a way to have the system run through each control in a table and look for something, and if it finds it to do something to that control.

I assume I would need some sort of For Loop. But I cannot get the syntax down right.

Thanks.
 
If you have Access2000 this will loop through the fields in a table. I do not know if you want to look at a value in the 'control' (field) and change that or change some aspect of the field itself so I will leave that up to you....

Dim rs As New ADODB.Recordset
Dim fld As ADODB.Field

rs.Open "MyTable", CurrentProject.Connection, adOpenDynamic

For Each fld In rs.Fields
*** Do your thing here ***
Next fld
 

Users who are viewing this thread

Back
Top Bottom