change control type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I have many comboboxs on many forms. How change the control type using code.

Dim ctl as Control
For Each ctl in Crotrols
If TypeOf ctl is ComboBox Then
'Then change the control type to a TextBox - How do I do that??

End if
Next ctl

regards johnb
 
Hi Alex

I don't wish to start moving controls on each of my forms. These Forms are
tightly packed with controls.

regards
johnb
 
There's not reason you can't follow Alex's advice even if the forms are
tightly packed with controls. Access doesn't care if controls are stacked
one on top of the other, and since you're doing it programmatically, you're
not going to have the same problem trying to select the correct control as
you would if you were doing this through the GUI. Give each new text box
have the same values for the Top, Left, Width and Height properties as the
existing combo box.
 
Back
Top