create a dynamic form

J

jack

How do create the OnClick method and background property
for a TextBox that is being created dynamically?

Dim ctlText as Control

Set frm = CreateForm
Set ctlText = CreateControl(frm.Name,
acTextBox, , "", "", intDataX, intDataY)
'Now i'm lost


Also, when this code runs, it opens up in design view.
How do open have it autmatically open in form view?

Thanks
 
A

Alex Dybenko

in order to add controls you have to have form open in design view
not sure, but you can probaly make it hidden in design view, add controls,
switch to normal view and then make it visible
HTH
 

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