I dunno about the above code but I can show you what I put in that finally got it to work in 2000.
Form_NEWTracking
Public Sub Combo119_Change()
If IsNull(Me![Combo119]) Then
txtDateDue = DateAdd("d", Me![Seq], Me![txtDateDue])
Else
'if not null
txtDateDue = DateAdd("d", Me![Seq], DLookup("[MILEDATE]", "MILE", "[MILESTONE]= '" & [Combo119] & "'"))
End If
End Sub
============================================================================================
Form_NEWTracking
Private Sub days_after_AfterUpdate()
If IsNull(Me![Combo119]) Then
txtDateDue = DateAdd("d", Me![Seq], Me![txtDateDue])
Else
'if not null
txtDateDue = DateAdd("d", Me![Seq], DLookup("[MILEDATE]", "MILE", "[MILESTONE]= '" & [Combo119] & "'"))
End If
End Sub
============================================================================================
Form_Milestones
Private Sub Date_AfterUpdate()
Dim rec As New ADODB.Recordset
Dim frm As [Form_Tracking Main]
Dim newfrm As Form_NEWTracking
Dim Seq As Long
rec.Open "SELECT * FROM allTracking WHERE GOVT='" & [Event] & "'", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Do While Not rec.EOF
rec("Date Due") = DateAdd("d", Nz(rec("Seq")), [Date])
rec.Update
rec.MoveNext
Loop
Forms![Tracking Main].Requery
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Must also add to the Data Library in "alt+F11"
-"Microsoft ActiveX Data Objects 2.0 Library"
2 Subforms with the main form called [Form_Tracking Main]
- Sub forms are:
-[Form_NEWTracking]
-[Form_Milestones]
For all Databases:
-Also change the Original Table to Reflect the following:
-Seq to a number field
-Govt to a text field
Dont forget to add the events to the Tracking Main field in which all the subforms lye.
-Add Events
-Afterupdate => Date - Milestones
-Change => Combo119 - NEWTracking
-Afterupdate => days_after - NEWTracking
What the bottom one does is when the date is changed in[Form_Milestones] it goes to the NEWTracking and changes the date in the date due field for any record with a matching milestone event. The top two just do a if else date add function on the form it self for changes there.
This is what I did to get it to work with my forms. Dunno if this will help you or not hope it does.