Bonjour,
Je souhaite afficher des enregistrements dans un état selon une liste de choix A ou B.
Si je sélectionne "A", tous les enregistrements commençant par "A.."
Si je sélectionne "B", tous les enregistrements commençant par "B.."
sinon "A.." et "B.." s'affichent
J'ai commencé à tester sur A mais sans succès !!!
Merci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 Dim stLinkCriteria As Variant Dim cpt As Byte Dim tableau(13) As String If Me.SF_PREL_COURANTO.Visible = True Then If Me.lst_agent.Value = "A" Then cpt = 10 For Each stLinkCriteria In tableau cpt = cpt + 1 stLinkCriteria = " ORDRECOURANTO = " & " '" & "A" & cpt & "'" Next DoCmd.OpenReport "PRELCOURANTO", acViewPreview, , stLinkCriteria Else MsgBox "erreur" Exit Sub End If Else MsgBox "erreur" Exit Sub End If
Partager