Hi Ajax,
Thanks a lot for your answer.
How dumb I am! Of course the txtNonDispo value is a string...
I apply something near to your solution by editing directly the SQL like that :
Code:
SELECT R_Contacts_tous_complet.ID_RELATION, R_Contacts_tous_complet.Contact_Nom, R_Contacts_tous_complet.Classer_sousFROM R_Contacts_tous_complet
WHERE R_Contacts_tous_complet.Contact_Nom Like "*" & forms![Ajouter au groupe]!SrchText & "*" And Eval([ID_RELATION] & " not in (" & forms![Ajouter au groupe]!txtNonDispo & ")")=True;
It works great for the query.
BUT
When I click the button that open the form calling the query I get a '3071' error on
Code:
DoCmd.OpenForm NomFormulaire, acNormal, , , , acDialog, Titre & "|" & strID_Contacts
I think it's due to the value of the text box txtNonDispo when the form is loading.
But it's weird cause I put a value in the text box before populating the listbox with the query...