Have a form frmHospitals containing
- a set of controls including HospitalID
- a subform sfmRestrictions showing restrictions applying to the current hospital, as a single field in Datasheet view; linked by HospitalID
- a second subform sfmContracts also linked by HospitalID, containing a set of controls including ContractID, and an embedded subform sfmDepartmentsCoveredByContract linked to the current Contract via ContractID
I'd like to be able to prevent users changing records in any part of the form, but provide an unlock button for the administrator to do so.
I can lock the selection of fields on the main form using a splendid procedure provided by TheAceMan.
Similarly I can lock the first subform using
me.sfmRestrictions.Locked = True
Repeating this for sfmContracts doesn't work, and my attempts at syntax to get to the embedded subform have all failed.
Any suggestions?
- a set of controls including HospitalID
- a subform sfmRestrictions showing restrictions applying to the current hospital, as a single field in Datasheet view; linked by HospitalID
- a second subform sfmContracts also linked by HospitalID, containing a set of controls including ContractID, and an embedded subform sfmDepartmentsCoveredByContract linked to the current Contract via ContractID
I'd like to be able to prevent users changing records in any part of the form, but provide an unlock button for the administrator to do so.
I can lock the selection of fields on the main form using a splendid procedure provided by TheAceMan.
Similarly I can lock the first subform using
me.sfmRestrictions.Locked = True
Repeating this for sfmContracts doesn't work, and my attempts at syntax to get to the embedded subform have all failed.
Any suggestions?