Visible radio button based on field

ECEK

Registered User.
Local time
Today, 10:20
Joined
Dec 19, 2012
Messages
717
I can do this if there is one record: ie

Private Sub Form_Open(Cancel As Integer)
If Me.field1 ="DontShow" Then
Me.cmd_splt.Visible = True
Else
Me.cmd_splt.Visible = False
End If
End Sub

This creates a button that masks my radio button ie hides it.
However this only works on single forms.

I need it to be different for each record in a continuous form.

Im putting the code in the "OnOpen" property. Maybe that's my problem?

I've also tried conditional formatting but it wont over-ride a transparent text box.

Thanks for the help in advance.
 
Conditional formatting doesn't have a Visible setting and you can't apply conditional formatting to a button or a checkbox.

There might be a workaround. Is the checkbox supposed to be read-only?
 
My idea was to have a non working command box or text box that sits over my working checkbox and if a certain criteria is met the text box is visible and if not then it isn't visible therefore allowing the checkbox to be ticked.
 
Ok I see, it's unfortunately not possible. As an alternative you could add some validation code to uncheck the checkbox if field1's value is "don't show ". This should be run in the After Update event of field1 and the checkbox and also in the Current event of the form (just in case).
 
Is there any need of generating today's date via the checkbox when you can already perform the validation using the Date() function?
 

Users who are viewing this thread

Back
Top Bottom