Dear Geez:
There are really only two things to know. You assign the RecordSource
property of a form or subform at runtine and it refreshes automatically to
that. This would likely be a query, allowing you to choose only the desired
columns and place them in the order you like.
The other thing is to assign the columns of data to the columns in the form
using the array of columns in the RecordSource rather than by name. At this
point you'll have great flexibility.
For column headings, and perhaps widths too, you could have a database of
these things, one table keyed by table name and another keyed by table and
column names. The table column could provide the SQL for the RecordSource.
The column names could give you the widths of each column needed and the
font size used. All this could then be prorated to size the controls and
fonts using the same kind of scheme used for screen sizing, but this time
within a fixed size subform instead of a whole screen. The whole thing is
perhaps 3 days work to set up if you're accustomed to this kind of work.
I'd really have to see very complete details to say for sure. But it could
all be written once and then be re-usable. Sounds like a very enjoyable
project to me, but I've done much of it before. Creating facilities that
work incredibly well in creating great user interfaces is usually the most
rewarding to me.
I haven't really used "can grow" like this. If a subform can grow, would it
possibly come to overlap another control? Or are you "growing" within the
limits established for the subform, to show only a few lines of data when
that's all that are available? That's pretty much done automatically
anyway, isn't it? Or are the controls within each row growing vertically so
the data can wrap? I would usually try to avoid that, but it could be a
useful feature given how much you want to put on the screen at once, so the
font doesn't decrease too drastically. Yes, that could be a nice addition
to what I was considering.
Well, you've got me thinking on my feet. I like that. And I can see that
this would be very useful and quite successful. All the work I've done
along this line before is considerable coding, but it runs very fast, with
no noticable delay bringing forms on the screen. So, for feasibility, I
give this a thumbs up.
Sorry, but Geezer is all I know to call you. It's your option whether you
give us a real name, but I can be flexible and change to that if you so
choose.
Tom Ellison
Geezer via AccessMonster.com said:
Tom said:
Dear Geez:
Just as a brain-storm kind of approach, what is the possibility of leaving
the subforms where they are and assigning the RecordSource of each form
according to the priority once you've established that. Can you make them
all the same size. We can adjust column headings and widths at run time.
Make sense as an alternative?
This sounds like a potential solution. The whole "changing RecordSource"
is
foreign to me so I'd need some direction on how to do it. The subforms
are
the same width now and are set to "Can Grow" so the size of the container
adjusts as the recordset size increases. Any info you need to further
explore this possibility?
Tom Ellison
I have a main form that is unbound and on it are 15 subforms each based
on
seperate queries. I currently have all of the subforms visibility set
to
[quoted text clipped - 11 lines]
the
bottom. Can this be done? Thanks