need help with vba

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 ???
 
D

Dirk Goldgar

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top