Create a control at runtime

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top