Hi Jessica
An option group can contain a number of different types of child controls – option (radio) buttons, or toggle buttons, or checkboxes. In any of these cases they will be mutually exclusive, so you can just choose whatever suits your PHB's preference.
Instead of binding your yes/no field to your single checkbox, you bind it to your option group. The option group contains two child controls – one for Yes (OptionValue=-1) and one for No (OptionValue=0).
I think that it's not possible for a yes/no field to be Null, so the default value will be No (false) unless you set the DefaultValue of the field to True in the table.
Best wishes,
Graham [Access MVP since 1996]
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, 26 March 2015 08:52
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Re: Yes/No Checkbox on Continuos Form/Subform
Thanks Bill, I have an option box with the two radio buttons for Yes and No. How do I use an option box without the check boxes?
Sorry, I have a lot to learn about Access.
Jessica
On Wednesday, March 25, 2015 2:42 PM, "wrmosca@comcast.net [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:
Jessica
Don't you just love pointy-hair bosses? Use an option group with no check boxes. You could fake check boxes but it would require a lot of coding for no good reason.
Regards,
Bill Mosca, Founder - MS_Access_Professionals
Microsoft Office Access MVP
My nothing-to-do-with-Access blog
---In MS_Access_Professionals@yahoogroups.com, <hobackjessica@yahoo.com> wrote :
Good Afternoon all!
I'm trying to add yes/no checkboxes to a form. The checkboxes are actually on a subform which is continuous allowing the user to enter multiple selections on one form. I have no problem with just one checkbox for Yes, however, the bosses want Yes and No checkboxes so the user will have to check one or the other.
I tried to use an option group which works as far as storing data, however, if the user checks Yes on the first entry and then checks No on the second entry the first checkbox will switch to No. This doesn't appear to change the data being stored from the user's entries, just the checkbox appearance on the form. I'm afraid this will cause a lot of confusion.
What am I doing wrong?
Jessica
Posted by: "Graham Mandeno" <graham@mandeno.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar