need help with vba

  • Thread starter Thread starter DarkChronos
  • Start date Start date
D

DarkChronos

I need help making a msg appear next to a text box
Private Sub Form_Current()
If TotalPledged > 500 Then
Label25.Visible = True
Label25.FontBold = True
Label25.ForeColor = RGB(0, 0, 0)
Else
Label25.Visible = False
End If
End Sub
thats what i thought it would be but it shows the msg for all values
can anyone help me ???
 
DarkChronos said:
I need help making a msg appear next to a text box
Private Sub Form_Current()
If TotalPledged > 500 Then
Label25.Visible = True
Label25.FontBold = True
Label25.ForeColor = RGB(0, 0, 0)
Else
Label25.Visible = False
End If
End Sub
thats what i thought it would be but it shows the msg for all values
can anyone help me ???

Is this on a continuous form, by any chance? If that's the case, the
properties you set for the control will be the same for every record
shown on the form, because there's really only one copy of the control,
just drawn multiple times.

You might use calculated text box instead, with these properties:

Visible: Yes
Font Weight: Bold
Fore Color: 0
Locked: Yes
Enabled: No
ControlSource: IIf([TotalPledged]>500, "Your Caption", "")

(substituting your current label caption for "Your Caption" in the
controlsource).
 
Back
Top