Representing Logical Values

Although you can display logical values in a text box, it's not a good practice. For example, a Customer table might contain a field called CreditApproved that you declared as a Boolean value (a Yes/No data type in Access). You could use a text box to display the field and then use data validation to check that users have entered "Yes," "No," "True," or "False." But allowing unlimited data entry like this is just begging for users to enter "Provisionally" or "Deadbeat." Unless you're prepared to accept and interpret these entries, you can do the users and yourself a favor by using a control that's limited to two values.

Both Access and Visual Basic provide two controls that do a better job: check boxes and toggle buttons, which are shown in Figure 15-2.

Figure 15-2. Each check box and toggle button control is used to display a logical value.

Most people are familiar with check boxes, and they're a good choice for representing most logical values. Toggle buttons are used less frequently. They're more effective for Boolean values that equate to "on" and "off" rather than to "true" or "false." The problem with toggle buttons is that in their "off" state they're indistinguishable from command buttons. Since users expect that pressing a button will cause some action to be performed, many might be hesitant to press a button labeled "Credit Approved," thinking that doing so will initiate the approval process rather than simply indicate that it has been completed. For this reason, I prefer to use toggle buttons in sets, like option buttons.

On the subject of option buttons (also known as radio buttons), please don't use these controls to represent single logical values. Nothing in the Microsoft Windows environment actually prevents you from doing so, but it's unnecessary (check boxes do just as well) and inappropriate. Option buttons are intended to represent a set of mutually exclusive choices. A single option button all by its lonesome looks peculiar.

Worse, if you're using option buttons to represent several logical values in the same area of the form, users are likely to erroneously believe that they are somehow related and that they can choose only a single option button at a time. They will also expect that selecting one option will automatically cause the others to be deselected. It's always disconcerting to users when a computer system doesn't behave as they expect.



Designing Relational Database Systems
Designing Relational Database Systems (Dv-Mps Designing)
ISBN: 073560634X
EAN: 2147483647
Year: 1999
Pages: 124

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net