Hi,
I have a strange problem. I'm importing data into a base and when I open a form I want to grey-out some checkboxes if other checkboxes are not ticked in the imported data.
I use the onload event and type a simple code:
Private Sub Form_Load()
If Me.Quotas = No Then
Me.Capacity.Enabled = False
Else
Me.Capacity.Enabled = True
End If
End Sub
where Quotas and Capacity are checkboxes.
But this does not gray-out the box Capaciy when there is no tick in Quotas after loading the form. The strange thing is that the same code works fine if I put it in the after-update event for the Quota box and tick it on and of. But I want it to happen automatically at load.
What can be the problem?
Thanks,
Equilib
I have a strange problem. I'm importing data into a base and when I open a form I want to grey-out some checkboxes if other checkboxes are not ticked in the imported data.
I use the onload event and type a simple code:
Private Sub Form_Load()
If Me.Quotas = No Then
Me.Capacity.Enabled = False
Else
Me.Capacity.Enabled = True
End If
End Sub
where Quotas and Capacity are checkboxes.
But this does not gray-out the box Capaciy when there is no tick in Quotas after loading the form. The strange thing is that the same code works fine if I put it in the after-update event for the Quota box and tick it on and of. But I want it to happen automatically at load.
What can be the problem?
Thanks,
Equilib