Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Non/Editable SubForm Based On Checkbox From Main Form.

Status
Not open for further replies.

MagnusFox

IS-IT--Management
Jan 12, 2001
51
US
Main Form based on a query that returns a pair of Yes/No fields with the default value of Yes. Therefore the Main Form creates a new record with two checkboxes that are checked.

I want the sub form to remain locked/non-editable until all checkboxes are cleared (value No). Once the subform sees that all checkboxes are not Yes, unlock the subform so the user can enter data on the subform.

How, What and Where do I place code to achieve this?

Many Thanks
 
In the after update event of each checkbox you can put this code to decide if the subform can be enabled:

[tt]
If MyCheckBox1 = 0 And MyCheckBox2 = 0 then
Me.SubFormName.Enabled = True
Else
Me.SubFormName.Enabled = False
End If
[/tt]

HTH
Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top