F
Frankie via AccessMonster.com
I am trying to use the following code on the AfterUpdate Event of a
mainform [F_FicheContrat] which contains one subform
[F_FicheAvenant_sous_formulaire](this is also the subform control name):
If IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And Me!DateFin
< Date = False Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = True WHERE IDMission = " _
& Me!IDMission, dbFailOnError
ElseIf IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And Me!
DateFin < Date = True Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = False WHERE IDMission = " _
& Me!IDMission, dbFailOnError
ElseIf Not IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And Me!
F_FicheAvenant_sous_formulaire.Form!DateFinAVT < Date = False Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = True WHERE IDMission = " _
& Me!IDMission, dbFailOnError
ElseIf Not IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And
Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT < Date = True Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = False WHERE IDMission = " _
& Me!IDMission, dbFailOnError
End If
It keeps returning error #2455.
I just don't understand.
Can someone help me please ??
Thanks in advance
Frankie.
mainform [F_FicheContrat] which contains one subform
[F_FicheAvenant_sous_formulaire](this is also the subform control name):
If IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And Me!DateFin
< Date = False Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = True WHERE IDMission = " _
& Me!IDMission, dbFailOnError
ElseIf IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And Me!
DateFin < Date = True Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = False WHERE IDMission = " _
& Me!IDMission, dbFailOnError
ElseIf Not IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And Me!
F_FicheAvenant_sous_formulaire.Form!DateFinAVT < Date = False Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = True WHERE IDMission = " _
& Me!IDMission, dbFailOnError
ElseIf Not IsNull(Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT) And
Me!F_FicheAvenant_sous_formulaire.Form!DateFinAVT < Date = True Then
CurrentDb.Execute "UPDATE T_Missions SET " _
& "Contrat = False WHERE IDMission = " _
& Me!IDMission, dbFailOnError
End If
It keeps returning error #2455.
I just don't understand.
Can someone help me please ??
Thanks in advance
Frankie.