G
Guest
I am new to this forum and pretty new to VB code. I have not done much with
it in the past and what I do is very simple. I am having a problem getting an
If Then Else statement to run. In an Access database I would like a line to
display IF a number is greater than another number ELSE I do not want it to
display anything. Each field is setup in the Access Table as a Numeric
Datatype with a field size of Long Integer. When I execute the code it always
evaluates to True despite the value in VOLSpace. For the life of me I can't
figure out why. What am I doing wrong? Any help would be greatly appreciated.
Below is my code. (Did I mention it is very simple code?)
Private Sub VOLSpacetxt_AfterUpdate()
If VOLSpace < 85 Then
VOLSpacemsg.ControlSource = "='Increase the size of the VOL1 volume.'"
VOLSpacemsg.FontBold = True
VOLSpacemsg.ForeColor = vbRed
Else
VOLSpacemsg.ControlSource = "=' '"
End If
End Sub
it in the past and what I do is very simple. I am having a problem getting an
If Then Else statement to run. In an Access database I would like a line to
display IF a number is greater than another number ELSE I do not want it to
display anything. Each field is setup in the Access Table as a Numeric
Datatype with a field size of Long Integer. When I execute the code it always
evaluates to True despite the value in VOLSpace. For the life of me I can't
figure out why. What am I doing wrong? Any help would be greatly appreciated.
Below is my code. (Did I mention it is very simple code?)
Private Sub VOLSpacetxt_AfterUpdate()
If VOLSpace < 85 Then
VOLSpacemsg.ControlSource = "='Increase the size of the VOL1 volume.'"
VOLSpacemsg.FontBold = True
VOLSpacemsg.ForeColor = vbRed
Else
VOLSpacemsg.ControlSource = "=' '"
End If
End Sub