Null value

P

Pete Cumberland

I've got several triplestate boxes in my database and want to set their
defaut values to null (greyed out) but don't know how. I've tried using an
update query and setting the update to "Null" but this doesn't work and I've
also tried setting the default value in the table to "Null" but this doesn't
work either. What do I have to do.

Pete
 
V

Van T. Dinh

Are they bound to Boolean Fields in your Table?

If they are, Boolean Fields can only have values True or False and not Null,
i.e. only 2 states while you CheckBoxes can be tri-state ...
 
G

Guest

Pete:

You can use an integer number data type for the column rather than Boolean
(Yes/No) and make sure its Required property is False. However, be sure that
you understand what Null is, insofar as it is anything. Its not a value but
the absence of a value and is therefore semantically ambiguous. Opinions
differ on triple state logic. Even amongst the high priests of the database
relational model Codd supported it, but Date is very much against it.

Because of its nature (or lack of it!) Nulls don't behave like values. If
you compare Null with anything, even with Null, the answer will always be
Null, not True or False, which is why we have the IsNull function in VBA and
IS NULL in SQL. Nulls also propagate, e.g. Null plus anything will always be
Null.

If you need to represent three possible real values, rather than True, False
or Maybe (which is about as close as you can get to a meaning for Null in
this context) you might be better off with a text column.

Ken Sheridan
Stafford, England
 
P

Pete Cumberland

Hi, I have little idea whether they are bound to boolean fileds or not. I
have recently upgraded from Access 97 to 2003 and all of my triple state
boxes became dual state. I mamnaged to convert them back to triplestate by
setting the table field to "Number" and setting the checkbox, in form,
properties, to triple state. I just want to be able to set hem all to the
Null state either as a default value or bu using an update query.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top