Excuting code on changing record

mvrp350

Registered User.
Local time
Today, 22:52
Joined
Nov 25, 2004
Messages
12
Hi all,

I have a mainform, on this mainform I have a field with an ID.
On this mainform I have a subform, linked throug the ID (different table)
On my subform there's a checkbox and a textbox.

What I want to do is the following:
When the checkbox is checked the textbox is enabled, if the checkbox is not checked, the textbox is disabled.
This works fine when clicking the checkbox.
Now I want to disable/enable the textbox when a user changes the record in the mainform.
The content of the subform changes to the new ID. Now I want to trigger some code to disable/enable the textbox.

How can I do this?

Thanks.
 
Checkbox

Try doing this by putting the code in the On Current Event of
the subform.

If Me.Checkbox = True Then
Me.Textbox.Enabled = True
Else
Me.textbox.Enabled = False
End If
 

Users who are viewing this thread

Back
Top Bottom