I would like to update 3 textboxes on a subform1 after clicking a combo box on another subform2. Both subforms are on one Main form. I can update the controls for the first record on the subform with the code below. But when I attempt to create a second record by clicking on the combo box on subform2 I cannot update the controls on subform1 for the second record.
Private Sub cboIndex_AfterUpdate()
Forms![MainForm]![SubForm1].Form![Org] = DLookup("[Org]", _
"tblIndex", "Index = '" & [cboIndex] & "'"
Forms![MainForm]![SubForm1].Form![cboFund] = DLookup("[Fund]", _
"tblIndex", "Index = '" & [cboIndex] & "'"
Forms![MainForm]![SubForm1].Form![Program] = DLookup("[Program]", _
"tblIndex", "Index = '" & [cboIndex] & "'"
End Sub
Any suggestions would be appreciated.
Private Sub cboIndex_AfterUpdate()
Forms![MainForm]![SubForm1].Form![Org] = DLookup("[Org]", _
"tblIndex", "Index = '" & [cboIndex] & "'"
Forms![MainForm]![SubForm1].Form![cboFund] = DLookup("[Fund]", _
"tblIndex", "Index = '" & [cboIndex] & "'"
Forms![MainForm]![SubForm1].Form![Program] = DLookup("[Program]", _
"tblIndex", "Index = '" & [cboIndex] & "'"
End Sub
Any suggestions would be appreciated.