You may or may not like it, but that's the way it is.
Access is a data centric application development tool, VB
is not. Access controls are not the same as standard
windows, for performance reasons, Access was designed to use
"light weight" controls that are just pictures on the.
screen. The only standard control that has a (temporary)
hwnd is the control that has the focus.
I still have no idea what a "register control" is so I don't
feel comfortable addessing that part of your question.
However, if you're so inclined, you can revert to using APIs
to do a lot of non-standard stuff, but you will have to
write additional code to deal with data binding and all
kinds of other things that Access controls take care of
automatically.
A lot of folks have asked this kind of question of the years
and the answer is always the same: Precreate the invisible
controls at design time and make them visible as needed at
run time. Are you sure that you might have up to 100 of
them at once? How the heck are you going to fit all that
stuff on the screen at the same time?
Just in case we are communicating at cross purposes, I will
state that you can/should write a procedure that acts like a
mini, one time, design time wizard to create the controls.
If you really need that many copies of a set of controls, it
would be far less tedious than doing it all manually. Don't
forget about the limit of 754 controls while you're planning
all this.
--
Marsh
MVP [MS Access]
why I don't know in design time, how many controls will the user open.
I don't like add for example 100 pages and subforms to to form, allthough
the users oder the current table uses only 2.
With API we can create a window control dynamically in runtime, but I don't
know, how about access control (register control)...
In Visual Basic 6.0 we can also create a control in runtime, althought the
such a control doesn't exist on the form. I hopped, Access can it too.
Martin wrote:
I am not familiar with the term "register page", but instead
of adding a new subform control, you can open a separate
form. There is even a way to open the same form multiple
times.
yes, I know it, but this feature can not be the solution in my case. I
want
to use a form for a table, the first page (register) is for data, when
user
click on statisti, this form may create a new page and a subform on it,
which load the statistic form for this Table..., and this form is used
for
different Tables.... In design time I can not create static count for
pages
and subforms.
I can create in design time so many controls as it is posible, and set it
unvisible, and when it is necessary, I set them visible. But this is no
good
design...
Making controls visible/invisible is a far superior approach
to making design changes at run time. From what you've
said, that sounds like it might be the best way for you.