Superpat
Member
- Local time
- Today, 21:47
- Joined
- Aug 15, 2020
- Messages
- 105
Hello,
I have a form with two combobox.
The combobox, lst_NomBase
The combobox, lst_Module
With "Tous" =>"All", in the first combobox, It's good.
With selected name in lst_NomBase
I want the second in list has just the name concerning list
Can you help me ?
I have a form with two combobox.
The combobox, lst_NomBase
Code:
SELECT DISTINCT [NomBase] FROM tblVariables UNION SELECT " Tous" AS NomBase FROM tblVariables
ORDER BY tblVariables.[NomBase];
Code:
Private Sub lst_NomBase_AfterUpdate()
Dim sNewvar As Variant
If Me.lst_NomBase = " Tous" Then 'TOUS
Me.Filter = ""
Me.Filter = False
's_Bases = "*"
'Lister_r_VariablesBases (s_Bases)
Else
Me.Filter = ""
Me.Filter = False
Me.Filter = "[NomBase] = '" & Me.lst_NomBase.Column(0) & "'"
Me.FilterOn = True
's_Bases = Me.lst_NomBase
'Lister_r_VariablesBases (s_Bases)
Me.lst_Module.Requery
Me.Requery
End If
End Sub
The combobox, lst_Module
Code:
SELECT DISTINCT tblVariables.Modules, tblVariables.NomBase FROM tblVariables UNION SELECT " Tous",0 AS Modules FROM tblVariables
ORDER BY tblVariables.Modules;
With "Tous" =>"All", in the first combobox, It's good.
With selected name in lst_NomBase
I want the second in list has just the name concerning list
Can you help me ?