Hi,
I'm trying to copy the texte I've freshly enter in a field into a specific field of an ADD CUSTOMER form... just to avoid my users to have to enter the info twice.
So my code is at this point:
Private Sub NumClient_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_NumClient_NotInList
Dim intAnswer As Integer
intAnswer = msgbox("Ce client n'existe pas! Voulez-vous l'ajouter?", vbYesNo + vbQuestion, "Client Innexistant"
If intAnswer = vbYes Then
DoCmd.RunCommand acCmdUndo
DoCmd.OpenForm "frm_AjoutClient", acNormal, , , acFormEdit, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Exit_NumClient_NotInList:
Exit Sub
Err_NumClient_NotInList:
msgbox Err.Description
Resume Exit_NumClient_NotInList
End Sub
_______
What it is missing to achieve my objective???
Thank you very much

[sig][/sig]
I'm trying to copy the texte I've freshly enter in a field into a specific field of an ADD CUSTOMER form... just to avoid my users to have to enter the info twice.
So my code is at this point:
Private Sub NumClient_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_NumClient_NotInList
Dim intAnswer As Integer
intAnswer = msgbox("Ce client n'existe pas! Voulez-vous l'ajouter?", vbYesNo + vbQuestion, "Client Innexistant"
If intAnswer = vbYes Then
DoCmd.RunCommand acCmdUndo
DoCmd.OpenForm "frm_AjoutClient", acNormal, , , acFormEdit, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Exit_NumClient_NotInList:
Exit Sub
Err_NumClient_NotInList:
msgbox Err.Description
Resume Exit_NumClient_NotInList
End Sub
_______
What it is missing to achieve my objective???
Thank you very much
[sig][/sig]