How to show results of many Queries in 1 single Form ?

  • Thread starter Thread starter Michael Reb
  • Start date Start date
M

Michael Reb

Hi,

I´d like to open several queries with undefined field numbers within 1
single form. Docmd.OpenQuery won´t help for it exposes no form functionality
, e.g. events.
Unfortunately forms have to be well-defined, meaning even for datasheet view
all the fields you want to be displayed have to be created before.

Nor do I want to build the form via CreateControl dynamically
neither do I want to use Listbox, (Hierarchical)FlexGrid or similar controls
to be filled with the query´s results.

Is there any solution for this functionality ?

Thanks in advance
 
I don't have a solution, but I do admire the problem.

Do you want to display the results of one query on the form at a time or do you
want to display the results of multiple queries on the form simultaneously?

If the former, you could have a form with a number of already created unbound
controls and then use code to bind your query fields to the already created
controls and hide (visible property) those controls that are not needed.

I don't know that this will work for you - especially in Datasheet view. But if
I understand your problem and needed a solution, this is one thing I would try.

Other than the above, I don't see a possible solution or perhaps I just don't
understand the problem.

If you are trying to display the results of multiple queries simultaneously on
one form, then I think you've eliminated all the options I can think of (beyond
subforms - but even those need to be defined).
 
Thanks a lot, John

Yes I meant the results of one query on the form at a time.
Your solution seems to be the best approach. Since queries may contain up to
255 fields the "quasi-dynamic form" should have 255 data controls.
There is no need to worry about form/control design because datasheet view
is suficient for me.

BTW I once created a database with a dynamic form via CreateControl which
doesn´t work with MDE. Then I created an additional MDB-DB containing just
that one dynamic form and delivered it with my MDE files.

Michael
 
Dear Michael:

We have a solution we use for crosstabs that might be useful. We
access the columns using an index instead of by name, and set the
column heading labels from the column names. Horizontal scrolling
uses a scroll bar control. We also "fix" the key columns on the left
so they do not scroll, if desired.

So, you just assign the RecordSource (query) to the form and it goes
from there. Does this sound at all like what you want?

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Thanks Tom,

Interesting idea. However I suppose that this solution won´t work for every
possible Select-Query.
I once used crosstab-queries for a similar problem which required some
preparation effort (Pre-Queries) even for that one output to be as desired.

Michael
 
Back
Top