Ticks/Checks in reports? (1 Viewer)

jimtimber

Registered User.
Local time
Today, 11:46
Joined
Apr 25, 2014
Messages
118
HI there,

I am creating a report and am struggling to use ticks/checks in it.

I have a query that looks for a date in a field and if there is a date, return "True", Else "False" in a separate field.

I am wanting on my report to show the date, and next to it a tick if there is a date in the field. Is it possible to get ticks/checks onto a report like this?

Thank you,

J
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:46
Joined
Aug 30, 2003
Messages
36,125
Try this as the control source of a checkbox:

=IIf(IsDate(FieldName), True, False)
 

vbaInet

AWF VIP
Local time
Today, 11:46
Joined
Jan 22, 2010
Messages
26,374
I have a query that looks for a date in a field and if there is a date, return "True", Else "False" in a separate field.
Unless the OP means:
Code:
=IIf(IsDate(FieldName), [COLOR="blue"]"[/COLOR]True[COLOR="blue"]"[/COLOR], [COLOR="blue"]"[/COLOR]False[COLOR="blue"]"[/COLOR])
Otherwise just "=IsDate(FieldName)" would be sufficient.

As for ticks, have a look at this:

http://allenbrowne.com/ser-52.html
 

jimtimber

Registered User.
Local time
Today, 11:46
Joined
Apr 25, 2014
Messages
118
Hi PBaldy,

Thanks for your help. That didn't work. First it brought through a paremeter box, then when it ran it did not tck the box that had dates against it. Please see the attached images.

Jim :)
 

Attachments

  • Untitled.png
    Untitled.png
    35.5 KB · Views: 105
  • Untitled22.png
    Untitled22.png
    9.2 KB · Views: 92

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:46
Joined
Aug 30, 2003
Messages
36,125
FirstAid would need to be available; you may need to put the field on the report and hide it. Also, I didn't have quotes around the values.
 

jimtimber

Registered User.
Local time
Today, 11:46
Joined
Apr 25, 2014
Messages
118
Hi VBAInet, I tried "=IsDate([FirstAid])" in control source but it still didn't tick the boxes that have a date in the FirstAid field, they all remained blank.

there are definitely dates in the field, in fact almost all clients have completed the first aid course (see the attached).

J :)
 

Attachments

  • Untitled.png
    Untitled.png
    7.9 KB · Views: 91

jimtimber

Registered User.
Local time
Today, 11:46
Joined
Apr 25, 2014
Messages
118
FirstAid would need to be available; you may need to put the field on the report and hide it. Also, I didn't have quotes around the values.


This has worked. Not sure why the quote marks came from. I added the FirstAid date box and then the Checkbox and it worked :) Thank you both.

To hide the date box, do I do that in the Properties?

Thanks again :)
 

vbaInet

AWF VIP
Local time
Today, 11:46
Joined
Jan 22, 2010
Messages
26,374
Just:
Code:
=IsDate([FirstAid])
No quotes.
 

jimtimber

Registered User.
Local time
Today, 11:46
Joined
Apr 25, 2014
Messages
118
Just:
Code:
=IsDate([FirstAid])
No quotes.

HI vbaInet, I did it with out the quotes, it didn't work. Like pbaldy's answer, would I have to have the FirstAid field, then hide it?

J
 

vbaInet

AWF VIP
Local time
Today, 11:46
Joined
Jan 22, 2010
Messages
26,374
Yes you may need to have it present in the section.
Essentially, it's the same process as pbaldy explained, the only difference is that it doesn't use IIF() because it already returns True or False.
 

Users who are viewing this thread

Top Bottom