Creating new controls at runtime

  • Thread starter Thread starter ZenoParadox
  • Start date Start date
Z

ZenoParadox

I have a form, and I want to create new Label controls at runtime (no
in design mode). I know in VB you can use something like

Set myLabel = Controls.Add("Vb.Label", "LabelName")

But this doesn't work at all in Access. The CreateControl method seem
to only be available in design mode and is used for making wizards an
the like -- what I need is something that can make new labels a
runtime (so I can place them over an image dynamically -- they are cit
names on a map).

There's gotta be a way to do this
 
AFAIK, your options are limited:
1) You can either change the form view to Design mode and use Create Control
and then change the view back to Form
or
2) Create a bunch of invisible dummy labels beforehand and "reveal" them
dynamically at runtime.
 
Back
Top