Toggle button display

DixieThunder24

New member
Local time
Today, 14:38
Joined
Mar 15, 2010
Messages
9
Is there a way to show the toggle buttons in an option group as NOT selected when the form first loads up? I've cleared all the default value properties in the table and the form but it always loads as showing one of the buttons pressed/selected. I want the form to load and both buttons in the group look the same. Your help is appreciated.
 
This answer is a copy of a response by Ken Sheridan to a similar question.

Code:
[COLOR="Purple"][I]The problem in your case is almost certainly that the 
control is bound to a column of Boolean (Yes/No) data type.  a Boolean column can
 only be TRUE or FALSE, which in Access are implemented as -1 or 0, so can never 
be Null.  So in any row in a table a Boolean column can only be TRUE or FALSE, 
never NULL.  By default it is FALSE.  You can, however, paradoxically set the 
DefaultValue property of a Boolean column to Null, and similarly of a control bound
 to such a column, as you have done.  This is pointless, however, as the value will
 become FALSE as soon as you begin to enter any data in the row, which is what is
 happening in your case.

You'll be pleased to know that there is a simple solution to this:  Change the data
 type of the column in table design view to Number and its Length property to 
Integer.  Make sure its Required property is False (No) so that it allows Nulls, and 
set its ValidationRule property to:

True Or False Or Is Null

You now have 3-way logic, TRUE, FALSE or MAYBE, which incidentally was one of
 Codd's original requirements when he introduced the database relational model 
back in 1971.[/I][/COLOR]
 
Yes, it was set to yes/no in the table it was bound to. Made those changes and of course it worked just like I wanted. Thanks a bunch, sorry for starting a new thread if it was answered. I must have not searched hard enough.
 
No it wasn't here. I knew I had seen this scenario and searched for it --using Google.
I'm glad it worked for you.
Now that it is posted, others may benefit.
 

Users who are viewing this thread

Back
Top Bottom