AccDeveloper
Programmer
Hi,
I have 9 List boxes (3 sets of 3 listboxes for ClientName, ClienId and Balance) on a Form and want to insert the values into a TempTable with the same fields (ClientName, ClientID, Balance)
I have following code to write 1 record into the table:
Private Sub UpdateData()
Dim db As DAO.Database
Dim tblRst As DAO.Recordset
Set db = CurrentDb
Set tblRst = db.OpenRecordset("TempTable"
With tblRst
.AddNew
.Fields("ClientName"
= Val (Me.Text1 & ""
.Fields("ClientID"
= Val (Me.Text2 & ""
.Fields("Balance"
= Val (Me.Text3 & ""
.Update
End With
tblRst.Close
End Sub
HOW DO I ADD ALL MY 3 SET OF RECORDS (I.E. MY FORM SHOWS 3 CLIENTS AT A TIME) ???
ANY HELP IS VERY MUCH APPRECIATED !!
THANKS,
VIC
I have 9 List boxes (3 sets of 3 listboxes for ClientName, ClienId and Balance) on a Form and want to insert the values into a TempTable with the same fields (ClientName, ClientID, Balance)
I have following code to write 1 record into the table:
Private Sub UpdateData()
Dim db As DAO.Database
Dim tblRst As DAO.Recordset
Set db = CurrentDb
Set tblRst = db.OpenRecordset("TempTable"
With tblRst
.AddNew
.Fields("ClientName"
.Fields("ClientID"
.Fields("Balance"
.Update
End With
tblRst.Close
End Sub
HOW DO I ADD ALL MY 3 SET OF RECORDS (I.E. MY FORM SHOWS 3 CLIENTS AT A TIME) ???
ANY HELP IS VERY MUCH APPRECIATED !!
THANKS,
VIC