Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2007

Tip: Looking for answers? Try searching our database.

Changing Yes/no box to combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scott04 - 26 Oct 2007 14:50 GMT
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.
Hoardling - 26 Oct 2007 15:29 GMT
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.

>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
[quoted text clipped - 4 lines]
>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.
Hoardling - 26 Oct 2007 15:37 GMT
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.

>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
[quoted text clipped - 4 lines]
>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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.