Enabling textboxs with radio button

kabir_hussein

Registered User.
Local time
Today, 14:18
Joined
Oct 17, 2003
Messages
191
Hi i have done this before but can not remeber how i did this.

Basically i am doing a report function where users can choose which type of report they want to print- i am decided to use a radio button function so user have to click on the radio button to enable which report they want to view

(see pic) http://img153.imageshack.us/my.php?image=radiobuttonstu8.jpg

Can some1 help me with the code i need to use so when a user clicks on the radio button one combo box is enabled and the other is disabled

Many thanks in advance
 
Kabir,

This isn't quite what you are asking for but I have something similar on one of my forms.

Hide the combo boxes (format them visible = no) and in the case select of your option buttons use me.yourcombobox.visible = true to show the appropriate box.

In the after update of the combobox add me.yourcombobox.visible = false to hide it again after use.

I will copy some code in if you want an example.

Hope this helps. :)
 
Hi Keith

Not 100% sure what you mean as i set the visble to no how will i click on it to enable the combo box

Could you please show me an example if you dont mind

Many thanks
 
Have a look at this code... It is to filter a report by Salesman... The option buttons are "All" or "By Salesman" if the option of "By Salesman" is picked then a combo box is visible....

Private Sub OptSalesman_AfterUpdate()

Select Case Me.OptSalesman
Case Is = 1
Me.cboSalesman.Visible = False
Me.cboSalesman.Value = Null

Case Is = 2
Me.cboSalesman.Visible = True

End Select

End Sub
This might help you.............
 

Users who are viewing this thread

Back
Top Bottom