Creating Function to refer control in Subform

mubi_masti

Registered User.
Local time
Tomorrow, 02:38
Joined
Oct 2, 2011
Messages
46
I have a main form which contains two subforms;subform1 and subform1 and a button btn

subform2 also contains a subsubform.

i want to develop a function which will be called through a button btn available in main form

through this function i want to pass values to first the controls of subform2 and then controls of subsubform. This values will add new records in subform2 as well as subsubform.

Can anybody help to develop this function
 
I am also trying the same through after update event of a control available in subform1.

Private Sub Act_date_AfterUpdate()
Me.Parent.Subform_MDB.Form!MDB.enabled = true
Me.Parent.Subform_MDB.Form!MDB.locked = false
Me.Parent.Subform_MDB.Form!MDB.Value = 0
Me.Parent.Subform_MDB.Form!Subform_MD.Form.AllowAdditions = True
Me.Parent.Subform_MDB.Form!Subform_MD.Form!MDBAct1.Value = "1"
Me.Parent.Subform_MDB.Form!Subform_MD.Form!MDBAct2.Value = "1"
Me.Parent.Subform_MDB.Form!MDB.enabled = False
Me.Parent.Subform_MDB.Form!MDB.locked = True
Me.Parent.Subform_MDB.Form.Requery
Me.Parent.Subform_MDB.Form!Subform_MD.Form.AllowAdditions = False
End Sub
 

Users who are viewing this thread

Back
Top Bottom