Iif?

bionicman

Registered User.
Local time
Today, 15:00
Joined
Jul 22, 2003
Messages
145
Is it possible (without using VB) to make a label visable depending on textbox information?

for example:

IF textbox1>= 5 THEN Label1.Visable=True

or something like this, i am not good with coding. if it is not possible without VB, can someone please explain how i could do it with VB?

Thank you!
 
Erm, what you've just typed is VB coding isn't it?
 
yeah, but like i said, i am not good with it. i do not know if it is correct, or where it should go at.

Thanks
 
Assuming that your control names are correct, the code below will work for you. Put it in the AfterUpdate event of textbox1 and also in the Current event of the form. To add code to events, go to the properties dialog for the form or control and click the three dots button to the rignt of the control. The build button may not be visible until you move your cursor over it. Choose code from the list of options and past the following code between the Sub and End Sub statements that the builder built for you.

Code:
IF Me.textbox1 >= 5 THEN 
    Me.Label1.Visable = True
Else
    Me.Label1.Visible = False
End If
 
First off, thank you, but i am still having problems. Maybe i am just missing it, but i cannot find the afterupdate field in my textbox properties.
To add code to events, go to the properties dialog for the form or control and click the three dots button to the rignt of the control.
Do you mean the Expression builder? i found that, but you said to choose code from the list of options, but i cannot find where to do that at.

Thanks for your patience :)
 
If you just right-click on the text box and from that menu choose "Build Event".
then from the 3 options which appear, choose "Code Builder".
 
hhhhmmm, ok, i see that now..... but it is grayed out, and i cannot select it.... i must be doing something wrong.
 
Can we at least spell Visible correctly?

You too, Pat. ;) :p
 
lol, nice new signature, Hockey. :rolleyes:
 
I figured out a way around this..... Thanks for all your help
 

Users who are viewing this thread

Back
Top Bottom