-
I want to change the alkalinity field borderstyle property if the text or number is >135. if so the borderstyle property would change from transparent to solid.
below is my attemp but does not seem to work. Can someone help me? Thank you.
Select Case ("Alkalinity")
If ("Alkalinity") > 135 Then
Reports![General Chemical Query Grounwater Subreport]![Alkalinity].Borderstyle = Solid
-
I don't understand what you mean by text or number, but:
Code:
Select Case Alkalinity
Case "Alkalinity"
'It equals Alkalinity
Case Else
'Otherwise, do this
End Select
-
borderstyle property
What i am trying to do is this. I want to change the borderstyle property of a text box. If the value of the text box is greater or equal to 135 the borderstyle property will change from transparent to solid. Therefore when my report qet's printed or viewed the alakalinity value will have a solid border around the text box because the value would be greater or equal to 135, and if the value is below 135 the text box would not have a boprder around it. I want call this procedure in the criteria section of the field called alkalinity of a query.
-
Code:
Public Sub SetBorder()
Const SOLID = 1
Const NONE = 0
If Val(Text1.Text) >= 135 Then
Text1.BorderStyle = SOLID
Else
Text1.BorderStyle = NONE
End If
End Sub