Fully Qualified

XelaIrodavlas

Registered User.
Local time
Today, 21:38
Joined
Oct 26, 2012
Messages
175
I am trying to set up a (locked) checkbox on a form so that it becomes checked if there is one specific entry in one subform, and another entry in another subform. But I haven't quite got the access-brain to figure it out.

So far I've tried altering the control source of the checkbox to the following statement:

=IIf([subform1].[Form]![s1control]=7 And [subform2].[Form]![s2control]=13,True,False)

The idea was that if the first control lists 7 and the second lists 13 then the checkbox would be true (checked) otherwise it would be false (unchecked) but this does not work. Can anyone recommend a way to fix this, or a better way altogether??

I also tried making a new field in the original forms corresponding data table, but when entering the calculated field it wouldn't allow me to link to other tables.

Thanks!!
 
The way I would go about this task would be to use VBA to populate the value of the check box, and allow the VBA to run through the various database checks to determine if the box should be checked or not.

Just be sure to set the check box Locked property to True to make it read-only.

Check boxes accept the VBA True/False constant values.

So on the Form, in VBA, you would code setting the control via:

Code:
Me.fldCheckBox.Value = True
Me.fldCheckBox.Value = False
 

Users who are viewing this thread

Back
Top Bottom