Create a Text Box in a Form with VBA Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

MS Access 2003

Is it possible to create a text box in a form with VBA code? If so, then how?

If not, does anyone have a suggestion about coding to create forms from
user’s input on-the-fly?

Thanks
 
WayneS said:
MS Access 2003

Is it possible to create a text box in a form with VBA code? If so, then
how?

If not, does anyone have a suggestion about coding to create forms from
user's input on-the-fly?

Thanks

Modifying forms at runtime is a complete no no, and will result in a
un-stable, and generally un-worktable application.

You have to come with some designs, and data models that will solve your
needs. the "difficult" part of designing an application is coming up with a
table structure that does not need to be changed, and further then design
forms around those structures that don't need to be changed.

You might want to expand on what you need this dynamic form for. for
example, a person often needs to allow a user to enter several phone numbers
for a customer. If you use a related table, then the form will expand, and
allow you to enter as many phone numbers for that one customer (cell phone,
hoe phone etc). While the design of the tables and form don't change in
this case..the ability to enter 1, or 5 phone numbers will be the result of
this design. So, while the design is dynamic, more fields, and more text
boxes NEVER need be added to the form, and yet it behaves in a dynamic way.

So, you might want to expand a bit on what it is you trying to do here, but
as a general design approach, trying to add, or modify fields at run-time is
NOT workable.

if you need a easy way to create a new form for data entry, you should try
using the form wizard, it will build that form for you....
 
Back
Top