create a dynamic form

  • Thread starter Thread starter jack
  • Start date Start date
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
 
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
 
Back
Top