A
Albert D. Kallal
arch said:Is it possible to add a textbox to an access form with vba code at run
time (eg during the open event).
Many years ago, I would have considered the above question a bad question,
or the "wrong" question.
However, so many people use HTML forms etc, then often this occurs.
Also, people coming from a VB environment often used the "clone" ability of
controls to "add" more text box prompts on a form.
Unfortunately, in ms-access, adding, or modifying your software designs at
runtime don't work well at all (it just asking for trouble, and the design
tools are not actually built to allow this with any degree of success).
So, what do to???
So, in most cases, if you need "more" then one piece of data, or a
"un-known" number, you use a sub-form, or some type of grid control.
here is some screen shots as to what I mean:
http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm
So, for "more" data, it hoped that you can use some type of grid display, or
perhaps even launch another form for prompting the additional data you need
to gather....
Adding extra controls to a screen via code just don't work well at all in
ms-access.....