M
Matt Winberry
Hi all,
I'm having trouble with the following setup. I've been tasked with creating
an Access DB with a report which will use graphic symbols for different
status conditions, (ie. green up arrow to indicate positive progress, red
down arrow to indicate negative progress, yellow double headed horizontal
arrow to indicate no change) and I have no leeway on changing the the
requirement for the symbols. My idea was to create a table with Yes/No values
for each status (schedule_up, schedule_down, schedule_same) linked to option
buttons on a form. The report would look at the status of the field and,
depending on whether it were set to True or False, set the visibility of the
graphic to True or False. I've been try to use the following code block to
get started for testing purposes, and can't get the report to turn my test
graphic off based on test data. The graphic is visible for all records, not
just the records with the True Schedule_Up value. Can someone tell me what I
might be doing wrong? Thanks!
Matt
Private Sub VBAExample()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("Input")
rst.MoveFirst
While Not rst.EOF
If rst!Schedule_Up = True Then
SchedUp.visibility = True
Else
SchedUp.visibility = False
End If
rst.MoveNext
Wend
rst.Close
End Sub
I'm having trouble with the following setup. I've been tasked with creating
an Access DB with a report which will use graphic symbols for different
status conditions, (ie. green up arrow to indicate positive progress, red
down arrow to indicate negative progress, yellow double headed horizontal
arrow to indicate no change) and I have no leeway on changing the the
requirement for the symbols. My idea was to create a table with Yes/No values
for each status (schedule_up, schedule_down, schedule_same) linked to option
buttons on a form. The report would look at the status of the field and,
depending on whether it were set to True or False, set the visibility of the
graphic to True or False. I've been try to use the following code block to
get started for testing purposes, and can't get the report to turn my test
graphic off based on test data. The graphic is visible for all records, not
just the records with the True Schedule_Up value. Can someone tell me what I
might be doing wrong? Thanks!
Matt
Private Sub VBAExample()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("Input")
rst.MoveFirst
While Not rst.EOF
If rst!Schedule_Up = True Then
SchedUp.visibility = True
Else
SchedUp.visibility = False
End If
rst.MoveNext
Wend
rst.Close
End Sub