Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionOption Explicit Dim cnx As ADODB.Connection Dim rs As ADODB.Recordset Private Sub Command1_Click(Index As Integer) 'On Error Resume Next Select Case Index Case 0 rs.MoveNext Case 1 rs.MovePrevious End Select Label1.Caption = rs.Fields(0) End Sub Private Sub Form_Load() Dim MySql As String Set cnx = New ADODB.Connection Set rs = New ADODB.Recordset cnx.Provider = "Microsoft.Jet.Oledb.4.0" cnx.Open "data source=C:\Documents and Settings\Mes documents\basic.mdb" MySql = "SELECT [Nom]" & _ " From Formulaire" & _ " ORDER BY Formulaire.[Nom];" rs.Open MySql, cnx End Sub Private Sub Form_Unload(Cancel As Integer) cnx.Close End Sub
MySql = "SELECT [nom-clt]" & _ " From client" & _ " ORDER BY client.[nom-clt];" rs.Open MySql, cnx, adOpenDynamic, adLockBatchOptimistic, -1