PDA

View Full Version : Change TextBox To ComboBox



ioncila
12-06-2009, 03:57 PM
Hi

In a database userform with textboxes and 3 option buttons (New, Change, Exclude), I would want (better, wish) to do the following, if possible:

1. When optNEW selected, most of textboxes would changed to Combos populated by listboxes.

2. When optCHANGE selected, userform would rest with textboxes.

The meaning of this:

If its a new register, specificies must be chosen from existing items.
If an existing register, changes will be setup only in quantities textbox.

Is this too ilogical?

Thanks
Ioncila

GTO
12-06-2009, 05:40 PM
GreetingsHi ioncila,

I do not believe you can actually change an existing control's type, but you could create both the textboxes and comboboxes and siz/locate them atop each other. Then use the option buttons to set the text or combo boxes' visibility as needed.

Mark

mikerickson
12-06-2009, 07:15 PM
Another approach would be to use combo boxes through out and set the .ShowDropButtonWhen to "Never" when you wanted it to act like a TextBox.