I have a report whose Record Source is set to a query (qryprodgio).
The Format event of the Detail section goes:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
rst.Open “qryprodgio“, cnn, adOpenKeyset, adLockOptimistic
If rst!powerday > Forms!mask1!Text25 * 1000 Then
Reports!prodgio!Text36.Visible = True
Reports!prodgio!Text36 = “more than ” & Forms!mask1!Text25 & “MW”
Else
If rst!powerday < Forms!mask1!Text23 * 1000 Then
Reports!prodgio!Text36.Visible = True
Reports!prodgio!Text36 = "less than " & Forms!mask1!Text23 & "MW"
End If
End If
rst.Close
End Sub
Even when I purposefully set the values in text23 or text25 in order to set off the if condition, I can never see Text36's content in the report.
What's wrong?