I'm using Access 2000 with DAO.
I have a query that contains approx 50 fields for each record. I would like
to be able to check every field in the query for a value of "T"
If any field for the selected record has a value = "T" then the value of the
query is true. Otherwize it is false.
How can I loop through every field looking for the "T"?
Thanks in advance,
Alan
You will need to generate the SQL statement that examines each field, e.g.:
SELECT * FROM Table1
WHERE 'T' IN ([Field1], Field2], [Field3], ... );
Almost certainly, these fields should be *records* in a related table, so
that the main record can have as many of these as apply (up to 50 related
records for each record in the main table.) With this correctly normalized
design, there would be only one fields to search.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> I'm using Access 2000 with DAO.
>
[quoted text clipped - 10 lines]
> Thanks in advance,
> Alan
Alan B. Densky - 22 Dec 2006 05:14 GMT
Thank you!
Alan
> You will need to generate the SQL statement that examines each field, e.g.:
>
[quoted text clipped - 20 lines]
> > Thanks in advance,
> > Alan