Vba sous formulaire liste box et Sql

Résolu
Didoch54000 Messages postés 308 Date d'inscription   Statut Membre Dernière intervention   -  
Didoch54000 Messages postés 308 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
Voila grace a vos aide aux tutos et a mes connaissance j'avance petit à petit dans Access, cependant j'ai un souci :
J'ai creer une listebox implementer via une requete :
Sub AfficherOptionConfig()
 DoCmd.SetWarnings False
 If Not Me.Config.Value = "" Then
   ' Me.lst_ConfigOption.Enabled
    Dim SQL_Rappel As String

    SQL_Rappel = "Select Logiciel, Version from tbl_Config Where tbl_Config.Nom ='" & Me.Config & "';"
    Me.lst_ConfigOption.RowSource = SQL_Rappel
  Else
    Exit Sub
End If
End Sub


Celle ci fonctionnait à merveille mais dans un soucit de gestion de la fentre j'ai décider de créer des onglets et de mettre ma liste box dedans (implicitement je pensait que cela aurai pu fonctionner, mais non )
Donc voici ce que j'ai déja essayer de faire :
  Forms![frm_Pc].Form![frm_ConfigOption]![lst_ConfigOption].RowSource = SQL_Rappel
    frm_Pc.frm_ConfigOption.lst_ConfigOption.RowSource = SQL_Rappel


Mais ni l'un ni l'autre ne tourne.
Merci encore une fois pour votre aide
A voir également:

1 réponse

Didoch54000 Messages postés 308 Date d'inscription   Statut Membre Dernière intervention   26
 
Re ,
J'ai réussit ,Bon ba je me répond à moi même mais on ne sait jamais si ca peut aider , c'était ma requete qui était fausse :
SQL_Rappel = "Select Logiciel, Version from tbl_Config Where tbl_Config.Nom ='" & Forms![frm_Pc]![Config].Value & "';"
       Forms![frm_Pc].Form![frm_ConfigOption]![lst_ConfigOption].RowSource = SQL_Rappel
0