Report Display controls based on values in record (1 Viewer)

rth@trinitylabs.org

New member
Local time
Today, 06:15
Joined
Dec 18, 2018
Messages
10
I have a Report that displays students (first name, last name, class list, and if they have a car or not). I want the report to show each student on a line, and display a Label ("CAR") if said student has access to a car.
I tried Report -- Current Event, but that seems to do nothing, so tried the On Load Event, which just makes every record show "CAR."

Here is the equation:

Code:
If chkCar = True then
  chkCar.Visible = True
  lblCar.Visible = True
End If

the chkCar & lvlCar Visible States are set as "No" in the Properties Sheet.

Am I using the wrong Event? Or can Reports do this sort of thing?

Thanks in advance.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:15
Joined
May 7, 2009
Messages
19,245
there is a simple hack for this.
create a Query (Query1) from your table.
then from the Query create your report.
note that the "chk" field has Wingding as it's Font.
 

Attachments

  • IsThatMyCar.accdb
    424 KB · Views: 95

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:15
Joined
Feb 19, 2002
Messages
43,275
I would use the detail section's Format event. You also need to toggle the value.
Code:
If chkCar = True then
  chkCar.Visible = True
  lblCar.Visible = True
Else
  chkCar.Visible = False
  lblCar.Visible = False
End If
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:15
Joined
Sep 21, 2011
Messages
14,307
Could that be shortened to ?
ChkCar.Visible = chkCar
Etc etç
 

rth@trinitylabs.org

New member
Local time
Today, 06:15
Joined
Dec 18, 2018
Messages
10
That works great. Thanks.
there is a simple hack for this.
create a Query (Query1) from your table.
then from the Query create your report.
note that the "chk" field has Wingding as it's Font.

Nice. Let the Query do all the heavy lifting. That works great. Thank you very much.
 

Users who are viewing this thread

Top Bottom