change control type

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
 
G

Guest

Hi Alex

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

regards
johnb
 
D

Douglas J. Steele

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.
 

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