I have a similar question as thread 703-893155. I have a report that uses a query as it's recordsource and I would like to know how to hide a label, that when a field has a value of -1, the label is displayed and when it's value is 0, it is not displayed. The field I am wanting to read is a yes/no field. I have gotten my code to work most of the way, that is, it reads the desired records, but it is not displaying the label when requested. Can someone help?
My code is
Am i on the right track?
Many thanks,
Wantabie
My code is
Code:
[blue]Private Sub[/blue] Report_Open([red]Cancel[/red] as integer)
Dim db As Database
Dim rst As Recordset
Dim varBookmark As Variant
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblTicketingSystem", _ dbOpenDynaset)
rst.MoveLast
rst.MoveFirst
Do Until rst.EOF
varBookmark = rst.Bookmark
if rst!Chronic = True Then
Me.lblChronic.Visible = True
Else Me.lblChronic.Visible = False
End If
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
[blue]End Sub[/blue]
Am i on the right track?
Many thanks,
Wantabie