Je te donne ici deux exemple tirés de mes programmes. L'un montre l'écriture et l'autre montre la lecture! 'ecriture a = cmb_modif_nom.Text b = txt_modif.Text j = 1 Open "C:\fichier_fournitures" For Random Access Read Write As #1 Do While Not EOF(1) Get #1, j, b_action If b_action.nomprod = a And Option1.Value = True Then b_action.ref_nomenc = b End If If b_action.nomprod = a And Option2.Value = True Then b_action.ref_gibus = b End If Put #1, j, b_action j = j + 1 Loop Close #1 ' lecture Open "C:\fichier_fournitures" For Random Access Read As #1 j = 1 Do While Not EOF(1) Get #1, j, b_action If nomproduit = b_action.nomprod Then lbl_refnom.Caption = b_action.ref_nomenc Label3.Caption = b_action.ref_gibus lbl_article.Caption = nomproduit lbl_article.Visible = True Label14.Caption = b_action.compte Label14.Visible = True End If j = j + 1 Loop Close #1
|