bonjour à tous.
je visualise une table sous acces dans un datagrid,ce que je veux en cliquant sur un enregistrement de datagrid les informations correspondantes s'affichent dans des texbox correspondants.
voici mon code
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
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
 If Text2.Visible = False Then
  Text2.Text = DataGrid1.Text
  Text2.Visible = True
  Else
  Text2.Text = Text2.Text & vbCrLf & DataGrid1.Text
  Text2.SelStart = Len(Text2)
 End If
 Do While Not rs.EOF
 If Trim(rs!nom = Text2.Text) Then
            afficher
           Text2.Visible = True
           Text2 = rs!nom
           Exit Sub
            End If
            rs.MoveNext
        Loop
 
  End Sub
MERCI D'AVANCE