Options on forms that hide once used?

dakcg

Registered User.
Local time
Today, 21:57
Joined
Aug 24, 2001
Messages
88
Hi, Is there a way to hide a checkbox on a form once it has been activated? ex: The user checks a checkbox on frmChooseOption, the corresponding form opens, and once the user clicks continue, the frmChooseOption opens up again, without any checkboxes that had already been checked.

I hope this makes sense, and that someone can help me.

Thanks in advance

DAK
 
How I think you would have to do this is to bind all your checkboxes to a field in a table. The table can just include the name of the checkbox and true/false and bind your forms to this table. Then, on the On_Open event of the form, you can loop through all the checkboxes and hide those that have a true value.

eg
Dim ctl As Control
For Each ctl In Me.Controls

Select Case ctl.ControlType
Case acCheckBox
If ctl.value = true then
ctl.visible = false
else ctl.visible = true
End Select

Next ctl
 

Users who are viewing this thread

Back
Top Bottom