Does anyone know how to pull all the field names of an access query into an array so that you could loop (for each) through them and do some action with every value that they contain for a certain record?
depends how you are accessing the query I guess - and what app you are using....????
As an example you can use something like this which should be pretty generic:
Code:
OPTION BASE 1
Set rst = dbs.OpenRecordset(sQuery) 'set query results = recordset objects
For iCol = 1 To [b]rst.Fields.Count[/b]
myArray(iCol) = rst.fields(iCol).name
next iCol
Rgds, Geoff
Never test the depth of water with both feet
Help us to help you by reading FAQ222-2244 before you ask a question
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.