MS Access 2010 subforms. If not visible are they still enabled?
Posted on 2014-01-15
I have a main form with 2 x subforms in it, linked by Client_ID.
The main form contains Client Data. (datasource=tblClients) The subforms enable different payment charges to be made (both subforms have the same datasource i.e. tblDebitNotes)
When the main form is first opened I have set the two subforms NOT to be visible.
I have a combo control the user can select which payment type they wish to apply (single payment or Pro Rata payment) and this in turn then shows the correct subform for that payment to allow the user to enter details into.
My question is:
If a subform is NOT visible is it still enabled?
I ask this because i need to validate that data has been entered into whichever subform is visible prior to saving the main form (the validation fields are different on each subform).
There may a scenario when a user may select Single Payment, start completing subform1, change their mind and then select Pro Rata payment instead, which will hide subform1 and then show subform2.
Would the data in subform1 have been saved or discarded when the combo control was changed and would i need to validate for this when i save the main form?