Check Box as output in query

bakerboy_1111

Registered User.
Local time
Today, 09:02
Joined
Dec 1, 2003
Messages
43
Hello All,

Hopefully this one is not as difficult as my previous post.

I have a query, and I would like to add a column that checks to see if another column called Drawn is null or not.

If it is null, then in the output of my query, I would like to see an unchecked checkbox, and if it isn't null, then a checked check box.

So far in the query I have the following code:

Expr1: Iif(IsNull(Drawn), False, True)

Does anyone know how I can modify this to work the way I require?

Thanks for any responses.

Bakerboy
 
You'll need to do this in a form rather than a query. The good news is that you can have a form in datasheet view which looks just like a query. Use the Wizard to create a form based on the query and specify it as opening in Datasheet View. After the form is created, go to Design View and change the text box which is bound to your Iif expression to a check box.
 
Thanks for your reply,

I've tried it in a form and the check box appearance seems to be there, however I'm not getting it ticked or not ticked as desired.

I put the above code in the Control Source box, is this correct?
I've tried putting Yes and No instead of the True and False but still no luck.

Bakerboy
 
Rather than writing the Iif statement in the combo box's Control Source, try using it as an expression to define a field in the underlying query.
 

Users who are viewing this thread

Back
Top Bottom