Create a control at runtime

M

Marcus Lloyd

Is it possible to create a control on an access form at runtime?

I would like to create a label control and set it's data from a query.
 
B

Brendan Reynolds

Yes, but only by opening the form in design view. See 'CreateControl Method'
in the help file for details. Generally, however, it is best to create all
the controls you may need at design time, and hide or show them at run time
by setting their Visible property.
 
D

Duane Hookom

Controls can only be added while in design view. You might want to have an
invisible label control on the form. When you need it, set its Visible
property to True and set its Caption property.
 
Top