swicth combobox to textbox

641 views Asked by At

I have add a options form to my application. There is 2 radio buttons and when the options form is closing that form saves the data to database user is selected witch one of these radio buttons.

And I have another form is writing some data to database, user is selecting a item from combobox's list to add. I want to user can add that data manually too without of this combobox. When user select "manual" on options form, combobox must disappear and a textbox must appear and user is selected "list" then combobox must appear.

Hot can i do that? I need a new sql query too.

1

There are 1 answers

0
Hans Olsson On

If it's just the two controls, one easy way of doing it would be to place both of them on the form, on top of each other, and then just make one of them invisible, and when the user selects the other options, just change visibility on both of them.

You'll have to make sure that your form closing code that saves the data reads from the correct control of course, but that's just the matter of a simple if statement to check which of them is visible.