Hi, im setting up a facility (check boxes that need to be true) in a subform that looks at values on the main form and other associated sub forms to check they have values before the user can move to next record.
I'm using an array (variant) for code reuse and functionality, i can read the values out of the main form fields but my code falls over when it tries to look at a value on another subform? how can i get past this, below is the code i have been trying to use.
I'm using an array (variant) for code reuse and functionality, i can read the values out of the main form fields but my code falls over when it tries to look at a value on another subform? how can i get past this, below is the code i have been trying to use.
Public Sub array_interest()
generic_array(1, 1) = "Interest_id"
generic_array(1, 2) = Me.Parent.interest_id.value
generic_array(2, 1) = "Fullname"
generic_array(2, 2) = Me.Parent.Sub_form_interest.FullName.value
generic_array(3, 1) = "Interest_date"
generic_array(3, 2) = Me.Parent.Sub_form_interest.interest_date.value
generic_array(4, 1) = "Contact_phone"
generic_array(4, 2) = Me.Parent.Sub_form_interest.contact_phone.value
generic_array(5, 1) = "Property address"
generic_array(5, 2) = Me.Parent.Sub_form_interest.property_address.value
generic_array(6, 1) = "Property Postcode"
generic_array(6, 2) = Me.Parent.Sub_form_interest.property_postcode.value
generic_array(1, 1) = "Interest_id"
generic_array(1, 2) = Me.Parent.interest_id.value
generic_array(2, 1) = "Fullname"
generic_array(2, 2) = Me.Parent.Sub_form_interest.FullName.value
generic_array(3, 1) = "Interest_date"
generic_array(3, 2) = Me.Parent.Sub_form_interest.interest_date.value
generic_array(4, 1) = "Contact_phone"
generic_array(4, 2) = Me.Parent.Sub_form_interest.contact_phone.value
generic_array(5, 1) = "Property address"
generic_array(5, 2) = Me.Parent.Sub_form_interest.property_address.value
generic_array(6, 1) = "Property Postcode"
generic_array(6, 2) = Me.Parent.Sub_form_interest.property_postcode.value