updating one table from another

ozdemirozgur

Registered User.
Local time
Today, 14:53
Joined
Apr 29, 2011
Messages
47
Hi,

I am very new to access and eed some help. I need to update one table from another and there is one to many relations. i have the following code which works but because the second table has 700,000 records, it is extremely slow. Is there any way to improve the code.

Do While Not Main10_2000_Combined.EOF
RemunerationD = 0
RemunerationD = 0
RemunerationE = 0
RemunerationT = 0

Do While Not Rem10_2000_Combined_Annualized.EOF
If ((Rem10_2000_Combined_Annualized!Coy_Id = Main10_2000_Combined!Coy_Id) And (Rem10_2000_Combined_Annualized!Rem_Year = 2000) And (Rem10_2000_Combined_Annualized!OO_Rem_Pos = "D")) Then
RemunerationD = RemunerationD + Rem10_2000_Combined_Annualized!TOTAL
End If
Loop
Loop
 

Users who are viewing this thread

Back
Top Bottom