Check Box

  • Thread starter Thread starter Toco
  • Start date Start date
T

Toco

Hello, I have a report that shows user participation for
the YTD. There is a field in query called LastUpdate. If
the query is run, and the date in field falls between
query paremeters, I need checkbox to display -1,
or "checked". I have LastUpdate in detail section, but it
is not visable. My problem is checkbox is not apart of
query. I thought Subprocedure Report_Open is right place
to put code, but maybe not. Please see if my code is not
correct: Thank you

Private Sub Report_Open(Cancel As Integer)
If (Me.LastUpdate >= #01/1/2003# Or Me.LastUpdate <=
#12/31/2003#) Then
Me.Check50 = "-1"
End If
End Sub
 
Hi,
I think you can accomplish what you want in the detail
section of the main report. Add a new text box in the
detail section. Then, in the control source field, type
something like this: =IIf([LastUpdate] Between #1/1/03#
And #12/31/03#,"-1"," "). If the date is between range,
you will get -1. Otherwise, you will get a space that
doesn't really show on report.
 
Back
Top