showing certain forms on report (1 Viewer)

bacardi451

Registered User.
Local time
Today, 12:19
Joined
Mar 20, 2002
Messages
33
Hello,
I have a database that is used for tracking the truck that go out to a job site. on the form there is a checkbox that is selected when a truck is out if it is in the checkbox is deselected. I want to generate a report that only give me the list of trucks that are out according to the checkbox. If the checkbox is selected i want it to show it in the report if it is deselected it wont show. Is there a way to do this?

Thanks in advance
Al
 

GJT

Registered User.
Local time
Today, 12:19
Joined
Nov 5, 2002
Messages
116
Try Add the following routine to your report code module....

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
chkTrk.Visible = TruckValue
End Sub

eg. when the report is formatting itself it will check the value of the truck control that you have bound to the database and display the checkbox control displayed on the report - accordingly.
 

bacardi451

Registered User.
Local time
Today, 12:19
Joined
Mar 20, 2002
Messages
33
Thanks. I tried that but it does not work.

Al
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:19
Joined
Feb 19, 2002
Messages
43,257
You need to add selection criteria to the report's recordsource query.

In the criteria line for the checkbox column put -
-1

"-1" is the True value.
 

Users who are viewing this thread

Top Bottom