Help w/Report problem - upsized db

  • Thread starter Thread starter Dave Stoecker
  • Start date Start date
D

Dave Stoecker

Please bear with me, I'm still fairly new to this stuff...
I have the following code in a subreport based on a View:

' ***********************

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' Show a rectangle around row if status is "pending"
If Me.txtStatus.Value = "pending" Then
Me.BoxPending.Visible = True
Else:
Me.BoxPending.Visible = False
End If
End Sub
' ***********************

This was working fine in MDB, but is not functioning in ADP. I'm assuming
there are some syntax differences I'm missing.

I have similar code in a recently created report where the txtNowPending
value is from a Bit field, not Char as in the first example. This works
fine...

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' Set text value for 3rd column
Call GetMaxBeds(strBeds)
Me.txtBeds = strBeds
' check hidden status field
' draw rectangle around row if pending flag is set
If Me.txtNowPending = True Then
Me.BoxPending.Visible = True
Else:
Me.BoxPending.Visible = False
End If
End Sub

Is there a simple change I can make to the first code example to get it
working?

Or should I just write new code to evaluate txtStatus to True/False based on
the string value of the field?
(the view limits this field to two possible values)

Deadline looming - any help is much appreciated.

Thanks - Dave
 
OK,
I've now solved this problem by using an integer field to represent
"status", and a slight mod to the report code to match.
Now I just have to modify about 3 dozen views, reports, and procedures to
use the new field, ugh...

Thanks anyway...?
 
Back
Top