hansretallick
Technical User
I need to populate severeal fields in a sub form as an after update event procedure from a combo box. The main form sets fields as a result of the combo update - one example is CloseDate which I need to be inserted into a CloseDate field in a sub form.
I have tried this code, but it doesn't work:-
Dim RS As Recordset
Me.Dirty = False
Forms![frmInvoiceLandlord]![frmSubInvoiceLandlordDates].SetFocus
Forms![frmInvoiceLandlord]![frmSubInvoiceLandlordDates].Form![OpenDate].SetFocus
Do While Not RS.EOF
With RS
frmSubInvoiceLandlordDates.Form!OpenDate = Me.OpenDate
frmSubInvoiceLandlordDates.Form!CloseDate = Me.CloseDate
End With
Loop
RS.Close
So far I haven't had any success. Any ideas?
I have tried this code, but it doesn't work:-
Dim RS As Recordset
Me.Dirty = False
Forms![frmInvoiceLandlord]![frmSubInvoiceLandlordDates].SetFocus
Forms![frmInvoiceLandlord]![frmSubInvoiceLandlordDates].Form![OpenDate].SetFocus
Do While Not RS.EOF
With RS
frmSubInvoiceLandlordDates.Form!OpenDate = Me.OpenDate
frmSubInvoiceLandlordDates.Form!CloseDate = Me.CloseDate
End With
Loop
RS.Close
So far I haven't had any success. Any ideas?