Making text visible

mewfin

Registered User.
Local time
Today, 14:41
Joined
Aug 19, 2005
Messages
33
got 2 radiobuttons and i want the text further down the page to show or not show depending on the value on the radio buttons.

I have tryed making an IF, but it doesnt want to update when i change post, or when i start the form, the radio button get the correct button according to the table but the text wont show any way untill i reclick the radiobutton.
dont know if u got what i ment but if u didnt ill try to explain it more.
 
mewfin said:
got 2 radiobuttons and i want the text further down the page to show or not show depending on the value on the radio buttons.

I have tryed making an IF, but it doesnt want to update when i change post, or when i start the form, the radio button get the correct button according to the table but the text wont show any way untill i reclick the radiobutton.
dont know if u got what i ment but if u didnt ill try to explain it more.

Small point but you might get more responses if you were to phrase your question in legible English not in telephone txt language. Not all of the experts here have English as their first language so make it easy on them:(

But first you will find lots of posts on this forum if you search on ".visible" Try to utilise some of the code you find there and then post back with an example of what you've done if it still doesn't work and you'll get bags of help. :)
 
well first of all my first language is'nt english its swedish=P.
i found similar questions but not where they change posts.
this is what i've written:

Private Sub rohs_AfterUpdate()
If RoHS.Value = 1 Then
rohstext.Visible = True
End If
If RoHS.Value = 2 Then
rohstext.Visible = False
End If
End Sub
---------------
RoHS is the groupbox with the radiobuttons.
RoHStext is the label i want to show up if groupbox value is 1.

It works when i fill in the form, but when i go back to the post the values are still in the table but the textbox doesnt wanna show up unless i refill it.

hope you got more of it this time ^__^
 
If the code works for you, place it in the oncurrent event of your form in addition to the after update.
 
To be on the safer side , if you have navigation buttons like next, previous etc. make sure you put the code in them as well. Also as jrjr mentioned put the code in the oncurrent event of the form as well as the onload.
Chris
 
wonder wich oncurrentevent is in swedish=P
 
mewfin said:
wonder wich oncurrentevent is in swedish=P

In the English version it is the very top (first) event under the events tab of your form.
 
You only need the code in the Form_Current event
in the AfterUpdate event of your textbox just put
Form_Current or Call Form_Current
 
jrjr said:
In the English version it is the very top (first) event under the events tab of your form.

ive got "vid ny post" wich meens on new post or something like that.

du u have something called before update?
 

Users who are viewing this thread

Back
Top Bottom