M
Michael Conroy
I have a query that (finally) gives me the results I want, however, I am
having trouble using the results. The query gives me eleven fields, Up5, Up4,
Up3, Up2, Up1, Target, Down1, Down2, Down3, Down4, Down5. The up and down are
sub queries where the Target (inner join) is the criteria for both. The basic
idea is to generate a hierarchial table based on whatever target is selected
in a combo box. It does this perfectly. If the target is the top or level
one, it will appear in the target field and the five down fields will be
populated and all the up fields will be empty. If the target is a level three
it will appear in the target with three ups populated and one down. If this
were Excel, I would simply delete the empty columns. In Access I need to do a
query with just Up5 to see if it is empty, then Up4, etc, until I get a field
that has some records in it. I can set up a querydef, but that "makes" a
query. How can I set up the query as a recordset and check the recordcount or
is EOF to see if there are any results? Thanks for your help
having trouble using the results. The query gives me eleven fields, Up5, Up4,
Up3, Up2, Up1, Target, Down1, Down2, Down3, Down4, Down5. The up and down are
sub queries where the Target (inner join) is the criteria for both. The basic
idea is to generate a hierarchial table based on whatever target is selected
in a combo box. It does this perfectly. If the target is the top or level
one, it will appear in the target field and the five down fields will be
populated and all the up fields will be empty. If the target is a level three
it will appear in the target with three ups populated and one down. If this
were Excel, I would simply delete the empty columns. In Access I need to do a
query with just Up5 to see if it is empty, then Up4, etc, until I get a field
that has some records in it. I can set up a querydef, but that "makes" a
query. How can I set up the query as a recordset and check the recordcount or
is EOF to see if there are any results? Thanks for your help