A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Change checkbox to combobox



 
 
Thread Tools Display Modes
  #1  
Old August 29th, 2006, 04:03 PM posted to microsoft.public.access.forms
jflash
external usenet poster
 
Posts: 11
Default Change checkbox to combobox

I just changed a checkbox for a Y/N field in a table to a combobox where one
can check "Y" or "N". Now I can't check either option button in the combobox
and cannot see any data from the table. I did notice that the data in the
table still displays as if it came from a check box (i.e. a box displays
rather than a "1" or a "2").

Have I lost my data or is there something I can do to undo the mess I've made?


  #2  
Old August 29th, 2006, 04:54 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Change checkbox to combobox

You can't check anything in a combo box. You only select an item from the
list. If the only choices are Yes or No, a check box is the most logical
control to use.

If the field you are comparing is not a Yes/No (Boolean) type, you could use
an option group with only two option buttons and set the Option Value
properties of the buttons to the two values you expect to find in the table.

"jflash" wrote:

I just changed a checkbox for a Y/N field in a table to a combobox where one
can check "Y" or "N". Now I can't check either option button in the combobox
and cannot see any data from the table. I did notice that the data in the
table still displays as if it came from a check box (i.e. a box displays
rather than a "1" or a "2").

Have I lost my data or is there something I can do to undo the mess I've made?


  #3  
Old August 29th, 2006, 06:03 PM posted to microsoft.public.access.forms
jflash
external usenet poster
 
Posts: 11
Default Change checkbox to combobox

Klatuu -

I'm sorry but I screwed up and said I used a combo box when I actually did
use an option box with only Y or N options. I originally used a check box
but I realized that I needed to know that I had an answer to something, one
way or another. If the check box wasn't checked, I wasn't sure if I had
performed a certain action.

Anyway, after I made the change, there were "N"s and "Y"s in my data and I
changed them to "2"s and "1"s, thinking that this was my problem. It wasn't.
When I open my form I cannot click either of the option buttons.

"Klatuu" wrote:

You can't check anything in a combo box. You only select an item from the
list. If the only choices are Yes or No, a check box is the most logical
control to use.

If the field you are comparing is not a Yes/No (Boolean) type, you could use
an option group with only two option buttons and set the Option Value
properties of the buttons to the two values you expect to find in the table.

"jflash" wrote:

I just changed a checkbox for a Y/N field in a table to a combobox where one
can check "Y" or "N". Now I can't check either option button in the combobox
and cannot see any data from the table. I did notice that the data in the
table still displays as if it came from a check box (i.e. a box displays
rather than a "1" or a "2").

Have I lost my data or is there something I can do to undo the mess I've made?


  #4  
Old August 29th, 2006, 06:44 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Change checkbox to combobox

Is the option group bound to the field that has the 1 or 2?
Are the Option Values for the two buttons set to 1 and 2?
Is the Option Group enabled and not locked?

To ensure an action is taken, you can set the Default Value of the option
group to Null and use the Before Update event to check to see if an option
has been chosen:

If IsNull(Me.MyOption) Then
MsgBox "You Must Select Yes or No"
Cancel = True
End If

"jflash" wrote:

Klatuu -

I'm sorry but I screwed up and said I used a combo box when I actually did
use an option box with only Y or N options. I originally used a check box
but I realized that I needed to know that I had an answer to something, one
way or another. If the check box wasn't checked, I wasn't sure if I had
performed a certain action.

Anyway, after I made the change, there were "N"s and "Y"s in my data and I
changed them to "2"s and "1"s, thinking that this was my problem. It wasn't.
When I open my form I cannot click either of the option buttons.

"Klatuu" wrote:

You can't check anything in a combo box. You only select an item from the
list. If the only choices are Yes or No, a check box is the most logical
control to use.

If the field you are comparing is not a Yes/No (Boolean) type, you could use
an option group with only two option buttons and set the Option Value
properties of the buttons to the two values you expect to find in the table.

"jflash" wrote:

I just changed a checkbox for a Y/N field in a table to a combobox where one
can check "Y" or "N". Now I can't check either option button in the combobox
and cannot see any data from the table. I did notice that the data in the
table still displays as if it came from a check box (i.e. a box displays
rather than a "1" or a "2").

Have I lost my data or is there something I can do to undo the mess I've made?


  #5  
Old August 29th, 2006, 09:11 PM posted to microsoft.public.access.forms
jflash
external usenet poster
 
Posts: 11
Default Change checkbox to combobox

Well, as I was checking to make sure the answer to your first question was
"yes", I figured out what my problem was. Although I changed the checkbox
to an option group, I neglected to change the data type on the field to
"text" (from Y/N). I made that correction and everything is running normal.

Thank you so much for your time and your help.

"Klatuu" wrote:

Is the option group bound to the field that has the 1 or 2?
Are the Option Values for the two buttons set to 1 and 2?
Is the Option Group enabled and not locked?

To ensure an action is taken, you can set the Default Value of the option
group to Null and use the Before Update event to check to see if an option
has been chosen:

If IsNull(Me.MyOption) Then
MsgBox "You Must Select Yes or No"
Cancel = True
End If

"jflash" wrote:

Klatuu -

I'm sorry but I screwed up and said I used a combo box when I actually did
use an option box with only Y or N options. I originally used a check box
but I realized that I needed to know that I had an answer to something, one
way or another. If the check box wasn't checked, I wasn't sure if I had
performed a certain action.

Anyway, after I made the change, there were "N"s and "Y"s in my data and I
changed them to "2"s and "1"s, thinking that this was my problem. It wasn't.
When I open my form I cannot click either of the option buttons.

"Klatuu" wrote:

You can't check anything in a combo box. You only select an item from the
list. If the only choices are Yes or No, a check box is the most logical
control to use.

If the field you are comparing is not a Yes/No (Boolean) type, you could use
an option group with only two option buttons and set the Option Value
properties of the buttons to the two values you expect to find in the table.

"jflash" wrote:

I just changed a checkbox for a Y/N field in a table to a combobox where one
can check "Y" or "N". Now I can't check either option button in the combobox
and cannot see any data from the table. I did notice that the data in the
table still displays as if it came from a check box (i.e. a box displays
rather than a "1" or a "2").

Have I lost my data or is there something I can do to undo the mess I've made?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:03 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.