Ask Your Question
0

Displaying a Query - True/False or Neither

asked 2017-01-09 17:45:40 +0200

John Jeffrey gravatar image

A really dumb question, I'm afraid - I'm sure I am missing something very simple.

I am designing a query on my names & addresses database which includes several 'true/false' fields. When I look at the result on screen to confirm it is doing what I want, the T/F fields are displayed as small squares. However, they have 3 styles instead of the two I would expect. Some contain a tick where I would expect to see one, some are empty where I would expect them to be empty; but some contain a solid black centre! These black ones seem to correspond to 'false' entries, but so do the empty ones. If I click on a black square I can cycle through a tick and a blank and back to black again. I have confirmed by trial and error that doing this does change the underlying data (ie if I turn a black square to a tick, the corresponding record is edited to show 'true' in that field)

What do the black squares mean, and how can I stop them appearing?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2017-01-09 18:14:59 +0200

Ratslinger gravatar image

The solid squares (depends upon system - could be dash or dimmed check mark) is the tri-state value of NULL. See this post and this post.

edit flag offensive delete link more

Comments

Thanks for that explanation, Ratslinger. I hadn't realised that there was a separate (third) state of NULL. Now all I have to do is work out how to change the field properties to 'mandatory' without building the database again from scratch . . .

John Jeffrey gravatar imageJohn Jeffrey ( 2017-01-10 14:43:02 +0200 )edit
0

answered 2017-01-10 14:45:10 +0200

John Jeffrey gravatar image

updated 2017-01-10 14:47:34 +0200

The basic explanation is that my original assumption was wrong - there are not just 2 states for a Boolean field of TRUE or FALSE, a third state of NULL is possible unless the field is made mandatory.

This does not answer my other problem of how to stop it happening after the fields have already been defined.

edit flag offensive delete link more

Comments

In the checkbox control properties (General tab), set Tristate value to No.

Ratslinger gravatar imageRatslinger ( 2017-01-10 16:07:30 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-01-09 17:45:40 +0200

Seen: 184 times

Last updated: Jan 10 '17