is there anyway to programatically in VBA code convert a textbox to a combobox (set it's control source) and then later convert it back to a text box?
Much appreciated.
Salzan
I'm pretty sure the appropriate Commands to do the conversion would be:
[CODE=vb]Application.Run Command acCmdChangeToCo mboBox
Application.Run Command acCmdChangeToTe xtBox[/CODE]
The problem as far as I understand it would be that the Form containing the Control must be in Design View, and you would need some Method that would shift focus to the Control before the Commands are applied. Just for curiosity, why would you want to do this? Wouldn't it be simpler to overlay the Controls, then manipulate them in this manner?
Thank you very much. WHile I was waiting for a reply I got the idea to create two controls and overlay them and then make one or the other visible depending on which one I want to show. So in effect I took your advise. Thanks.
Thank you very much. WHile I was waiting for a reply I got the idea to create two controls and overlay them and then make one or the other visible depending on which one I want to show. So in effect I took your advise. Thanks.
You are quite welcome, I really don't think that you would want to use the prior approach.
Comment