create new text box

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi all,

Is there a way to create a text box rogrammatically. What
I mean is when a form start(using the on load property)
the forms creates a text box with the form. Is this
possible to do? Any suggestion??

Thanks,

Mike
 
Yes, but it's not recommended. There is a limit to how many controls can be
created for a form; even when you delete a control, you've used up one of
those available.

It's better to put all needed controls on the form, and make them visible or
invisible as needed by your database. This is easily done by code.
 
Yes - you can use the CreateControl method of the form but to do this you
have to open the form in Design view and the user must have design
priviledges. I really don't recommend doing this because it can also lead to
other issues - a better way is to design the form with all the textboxes you
need then toggle the Visible property to show whichever ones you need at any
given time.

Post back if you need more help. Be sure to give a good description of your
form, the fields and the problem you are trying to solve.
 
Back
Top