You cannot do that.
You can create controls in report design view only, not while any of its
events are running.
In general, you don't want to use design view as it will prevent you
releasing an MDE later. CreateControl is useful only for things like
wizards.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Roberto Carabajal" <(E-Mail Removed)> wrote in
message
news:011FED52-F08D-4337-B9D1-(E-Mail Removed)...
> Hello:
> I would appreciate that somebody shows how to create textboxs or labels in
> a
> report from VBA code, I tried sintaxis like used in VB6 but didn´t work.
> I
> need to create an object within the Report_Page() event.
> Thanks in advance.
> Roberto