C
Chris L.
HI,
I have two tables inner joined and would like to input
(update) a variable in the second table using a field
from the first table. (In the primary table multiple
records are being related to a single record in the
second table) Having problems with the update. What am I
missing? THANKS.
CL
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strsql As String
Dim tx1 As Double
Set db = CurrentDb()
strSQL = "select * from comb03p inner join cito03p on
comb03p.city_num=cito03p.city_num"
Set rs = db.OpenRecordset(strSQL)
While Not rs.EOF
With cito03p
tx1 = cito03p!x1
cito03p![x1] = tx1 + rs![ttc]
cito03p.Update
End With
rs.MoveNext
Wend
I have two tables inner joined and would like to input
(update) a variable in the second table using a field
from the first table. (In the primary table multiple
records are being related to a single record in the
second table) Having problems with the update. What am I
missing? THANKS.
CL
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strsql As String
Dim tx1 As Double
Set db = CurrentDb()
strSQL = "select * from comb03p inner join cito03p on
comb03p.city_num=cito03p.city_num"
Set rs = db.OpenRecordset(strSQL)
While Not rs.EOF
With cito03p
tx1 = cito03p!x1
cito03p![x1] = tx1 + rs![ttc]
cito03p.Update
End With
rs.MoveNext
Wend