Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get Listbox Selected Item
Message
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Get Listbox Selected Item
Divers
Thread ID:
01511370
Message ID:
01511370
Vues:
73
How do you get the selected item from a listbox? I'm using Access 2007. So far I have this:
Private Sub lstGroups_AfterUpdate()

    Dim lngRow As Long
    Dim strMsg As String
    
    With Me.lstGroups
        
        For lngRow = 0 To .ListCount - 1
            If .Selected(lngRow) Then
                strMsg = strMsg & ", " & .Column(1, lngRow)
            End If
        Next lngRow
    
    End With
      
End Sub
But the IF statement is never true unless multiselect is on.

Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Répondre
Fil
Voir

Click here to load this message in the networking platform