With frm_prim.grille
Set tb = db.OpenRecordset("SELECT * FROM mots ORDER BY mots")
If tb.RecordCount = 0 Then Exit Sub
tb.MoveFirst
r = 0
c = 0
.Clear
.Rows = 1
Do Until tb.EOF
If Trim(tb("mots")) = "" Then GoTo suivant:
If .Text = "" Then
.Col = 0
.Text = tb("mots")
.Text = Trim(.Text)
.Col = 1
.Text = tb.AbsolutePosition
.Rows = .Rows + 1
.Row = .Row + 1
End If
suivant:
tb.MoveNext
Loop
End With
tb.Close ' --> 1
....
Set tb = db.OpenRecordset("mots") ' --> 2
tb.AbsolutePosition = Val(grille.Text)
tb.Edit
tb("mots") = zone_modif
tb.Update
tb.Close ' --> 3
With frm_prim.grille Set tb = db.OpenRecordset("SELECT * FROM mots ORDER BY mots") If tb.RecordCount = 0 Then Exit Sub tb.MoveFirst r = 0 c = 0 .Clear .Rows = 1 Do Until tb.EOF If Trim(tb("mots")) = "" Then GoTo suivant: If .Text = "" Then .Col = 0 .Text = tb("mots") .Text = Trim(.Text) .Col = 1 .Text = tb.AbsolutePosition .Rows = .Rows + 1 .Row = .Row + 1 End If suivant: tb.MoveNext Loop End With tb.Close ' --> 1 .... Set tb = db.OpenRecordset("mots") ' --> 2 tb.AbsolutePosition = Val(grille.Text) tb.Edit tb("mots") = zone_modif tb.Update tb.Close ' --> 3
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionWith frm_prim.grille Set tb = db.OpenRecordset("SELECT * FROM mots ORDER BY mots") If tb.RecordCount = 0 Then Exit Sub tb.MoveFirst r = 0 c = 0 .Clear .Rows = 1 Do Until tb.EOF If Trim(tb("mots")) = "" Then GoTo suivant: If .Text = "" Then .Col = 0 .Text = tb("mots") .Text = Trim(.Text) .Col = 1 .Text = tb.AbsolutePosition .Rows = .Rows + 1 .Row = .Row + 1 End If suivant: tb.MoveNext Loop End With tb.Close ' --> 1 .... Set tb = db.OpenRecordset("mots") ' --> 2 tb.AbsolutePosition = Val(grille.Text) tb.Edit tb("mots") = zone_modif tb.Update tb.Close ' --> 3