Hi Folks,
I have two tables. tblTele has two columns and 300 rows. I use it as input. tbl.telephone has 5 columns, 0 rows. I must copy the 300 rows into the second table so that I have N rows. N<300. The copy process depends on specific values of input fields. Now when a row is complete I add it to the tbl. telephone. But this adding process does not work. Error 13. The essential code is below. Help appreciated.
I have two tables. tblTele has two columns and 300 rows. I use it as input. tbl.telephone has 5 columns, 0 rows. I must copy the 300 rows into the second table so that I have N rows. N<300. The copy process depends on specific values of input fields. Now when a row is complete I add it to the tbl. telephone. But this adding process does not work. Error 13. The essential code is below. Help appreciated.
Code:
Set rs = db.OpenRecordset("tblTelel")
Set rt = db.OpenRecordset("tblTelephone")
rs.MoveFirst
While Not rs.EOF
............statements preparing the fields suffixed fn............
rt.AddNew
Debug.Print "addnew"
rt.Fields("ADI").Value = Nz(fnADI, "")
rt.Fields("SOYADI").Value = Nz(fnSOYADI, "")
rt.Fields("ADRES").Value = Nz(fnADRES, "")
rt.Fields("TEL").Value = Nz(fnTEL, "")
rt.Fields("SEL").Value = Nz(fnSEL, "")
Debug.Print "sel"
rt.Update
EndofLoop:
rs.MoveNext
Debug.Print "Loop ended I="; I
Wend