Pete Printer
Registered User.
- Local time
- Today, 09:38
- Joined
- Jul 28, 2014
- Messages
- 15
Hi
I have a staff form and a training details subform.
The training subform is bound to a junction table that contain staffIID , trainingID, passdate, expDate.
in the after update event of the subform ExpDate i have this code.
i have checked StaffID before its sent to the DMin and its correct.
when i use this with the first staff member its fine. if i then select another staff member on the parent form and make a change the previous result is returned.
Its as if the record is stuck
Thanks for looking at this
Best Regards
Pete
I have a staff form and a training details subform.
The training subform is bound to a junction table that contain staffIID , trainingID, passdate, expDate.
in the after update event of the subform ExpDate i have this code.
Code:
Private Sub ExpDate_AfterUpdate() 'saves changes and updates training Enddate
Dim EndDate As Date
Dim StaffNum As Long
StaffNum = Forms!frmstaff.staffID
DoCmd.Save
DoCmd.RefreshRecord
EndDate = DMin("ExpDate", "JunTblStaffTraining", [staffID] = StaffNum)
'MsgBox EndDate
Forms!frmstaff.stTraineduntill.Value = EndDate
End Sub
when i use this with the first staff member its fine. if i then select another staff member on the parent form and make a change the previous result is returned.
Its as if the record is stuck
Thanks for looking at this
Best Regards
Pete