Changing Yes/no box to combo box

G

Guest

I have a table that contains a field that is the data type Yes/no. Instead
of having the traditional checkbox I am opting for the combo box. I have
changed the display control to Combo box however when i go to add this to my
form it does not have a drop down with yes or no....I know there is something
little i must be missing. Another question is if i change it to this type of
design is my code still going to be if me.xxx = True Then.....or will it
change to if me.xxx = -1 Then? Thanks for your help as all my database just
utilize the checkbox yes/no feature and not the combo box feature.
 
H

Hoardling via AccessMonster.com

The combobox is not setup like the checkbox. It doesn't understand that your
looking for a simple yes or no. There are a couple of ways of doing this.

First you need to enter the combobox's property field. click on the combobox
then right click to open up options. go to Properties. Go to tab Data. In
the Tab you should see 2 spots called "Row Source Type and Row Source". In
row Source type you need to decide what type of data is for the options,
Table/query will look at a query, value will look at a value that you type in,
I can't recall what Field was used for, but I think it is the field of a
table. Choose the one you want to use. Next go to Row Source. If you chose
value you need to input the values you want, most likely you'll put something
like Yes;No or True;False or 0;-1 If you chose Table/query then you need
to click the button to the right with the ... and setup a SELECT statement,
NOTE: you need a table setup with (Yes and No) OR (True and False) OR (-1 and
0 ) as data. When you setup the query you could save it or when you exit out
through the top right windows exit button x you could save it there. There
is a difference, the regular save by clicking the little diskette button or
saying File>Save will physically save it to the Query section. By using the
top right windows x it'll save it to the form. I prefer the top right
windows x and save the query to the form. This will give you the choices
that users can select for the combobox.
 
H

Hoardling via AccessMonster.com

You could also use the comboboxes wizard, create a combobox onto the desired
form. A wizard box should appear titled combobox wizard. Follow the wizard
through, it should be easy to follow. I would recommend using this.
 

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

Similar Threads


Top