sql = "patients" Set rs = New ADODB.Recordset rs.Open sql, Con, adOpenDynamic, adLockOptimistic Dim x As Long For x = 0 To List2.ListCount - 1 With rs .AddNew !Receipt_no = Text1.Text !OPD_MRD = Text2.Text !Patientname = Text3.Text !Investigations = List2.List(x) !Receipt_date = Label6.Caption !Receipt_time = Label7.Caption .Update End With Next MsgBox "New student record successfully saved..", vbInformation, "Success"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)