bon pour ceux qui veulent bien m'aider voila comment je procede:
DoCmd.RunSQL "CREATE TABLE table_temp (col1 VARCHAR, col2 VARCHAR)",0
' Je remplis la table ainsi créé grace a ma requete SQL contenue dans ma_requete
DoCmd.RunSQL "INSERT INTO table_temp (col1, col2) " & ma_requete_SQL & "",0
je test ce qu'il y a dans ma table_temp
If [table_temp]![col1] = " " Then
valuecol1 = "And (([pretendant]![col1] = '*' or '') "
ElseIf [table_temp]![Lecture] = "D" Then
valuecol1 = "And ([pretendant]![col1] = 'D' or '' or 'B')"
ElseIf [table_temp]![col1] = "B" Then
valuecol1 = "And ([pretendant]![col1] = 'B' or 'C' or 'N')"
ElseIf [table_temp]![col1] = "N" Then
valuecol1 = "And ([pretendant]![col1] = 'N' or 'B' or 'Q')"
ElseIf [table_temp]![col1] = "Q" Then
valuecol1 = "And ([pretendant]![col1] = 'Q' or 'N' or 'J')"
ElseIf [table_temp]![col1] = "J" Then
valuecol1 = "And ([pretendant]![col1] = 'J' or 'Q')"
End If
ENSUITE:
select * from [pretendant] INNER JOIN blabla ON blabla = blabla where (blabla) " & valuecol1
malheureusement pour mes if ca fonctionne pas...
y'a pas un truc du style currentdb?????