Changing from bound textbox to dropdownlist

S

SF

Hi,

I am new to VB.NET. I try to start my first project linking to an Access
database. On my Form1, I have two fields (bound), Subject and Author. This
was done by draginf the table into the form. Since the author name are
mostly the same, I want to change this field to a dropdownlist but I do not
know how!. In Access, I just right click the field and select Change To
Combo Box

Could someone advice?

SF
 
R

rowe_newsgroups

Hi,

I am new to VB.NET. I try to start my first project linking to an Access
database. On my Form1, I have two fields (bound), Subject and Author. This
was done by draginf the table into the form. Since the author name are
mostly the same, I want to change this field to a dropdownlist but I do not
know how!. In Access, I just right click the field and select Change To
Combo Box

Could someone advice?

SF
In Access, I just right click the field and select Change To
Combo Box

We're not in Kansas anymore....

Anyways, just open up the ToolBox and drag a combobox onto the form.
Then click on the combobox and a arrow box should show up in the top
right corner, click it to expand the options. Click "Use Data Bound
Items" and then you should be able to select the datasource to bind to
and then set which field to display and which field to save as the
value (useful if you want to show a user's name but track the user's
ID).

Let me know if I made sense.

Thanks,

Seth Rowe
 
R

RobinS

I'm assuming you added the table as a DataSource. When you have your form
open in design mode and are looking at the table, it has icons to show what
control it is going to display. Try clicking on the dropdown and see if you
can change the control from Textbox to Combobox. If it works, drag the
field onto your form again and delete the other one.

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
 

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