show/hide group of radio controls when checkbox value = 0

L

lsb

I have grouped 8 radio buttons, and given them the same Tag name of
"mdcode".
how to I make this group visible when a checkbox "checkbox76" has a
value of 0 and hide the group when the checkbox value is -1?

Is there a simple code for this??

Thanks,
LSB
 
A

Allen Browne

Set the Visible property of the group in the AfterUpdate event of the check
box, and in the Current event of the form.

This example assumes thr group is named Frame0.

Private Sub checkbox76_AfterUpdate()
Me.[Frame0].Visible = Not Nz(Me.checkbox76.Value, False)
End Sub
Private Sub Form_Current()
Call Sub checkbox76_AfterUpdate
End Sub
 
L

lsb

The group of radio buttons work independently of each other - I grouped
them by highlighting them all and choosing the group function in the
Format menu of access. I've tried to name the group but it can't be
named. That's why I'm using the Tag to identify each item in the group
as the same thing.

I tried the code you've provided it's throwing errors on both forms.

Could you advise a little further? I've been at this for 12 hrs....I'm
a little frustrated.....

Many thanks,
LSB

Allen said:
Set the Visible property of the group in the AfterUpdate event of the check
box, and in the Current event of the form.

This example assumes thr group is named Frame0.

Private Sub checkbox76_AfterUpdate()
Me.[Frame0].Visible = Not Nz(Me.checkbox76.Value, False)
End Sub
Private Sub Form_Current()
Call Sub checkbox76_AfterUpdate
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

lsb said:
I have grouped 8 radio buttons, and given them the same Tag name of
"mdcode".
how to I make this group visible when a checkbox "checkbox76" has a
value of 0 and hide the group when the checkbox value is -1?

Is there a simple code for this??

Thanks,
LSB
 
D

Douglas J. Steele

What's the error?

You did remember, I hope, to change Frame0 to whatever your frame is named?
For that matter, do you have a frame? (from your description, it sounds as
though you might not)

Also, there is a slight typo in Allen's code.

Private Sub Form_Current()
Call Sub checkbox76_AfterUpdate
End Sub

should be

Private Sub Form_Current()
Call checkbox76_AfterUpdate
End Sub


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


lsb said:
The group of radio buttons work independently of each other - I grouped
them by highlighting them all and choosing the group function in the
Format menu of access. I've tried to name the group but it can't be
named. That's why I'm using the Tag to identify each item in the group
as the same thing.

I tried the code you've provided it's throwing errors on both forms.

Could you advise a little further? I've been at this for 12 hrs....I'm
a little frustrated.....

Many thanks,
LSB

Allen said:
Set the Visible property of the group in the AfterUpdate event of the
check
box, and in the Current event of the form.

This example assumes thr group is named Frame0.

Private Sub checkbox76_AfterUpdate()
Me.[Frame0].Visible = Not Nz(Me.checkbox76.Value, False)
End Sub
Private Sub Form_Current()
Call Sub checkbox76_AfterUpdate
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

lsb said:
I have grouped 8 radio buttons, and given them the same Tag name of
"mdcode".
how to I make this group visible when a checkbox "checkbox76" has a
value of 0 and hide the group when the checkbox value is -1?

Is there a simple code for this??

Thanks,
LSB
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 

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