HELP with two tables and Loop question

  • Thread starter Thread starter Julio Hidalgo
  • Start date Start date
J

Julio Hidalgo

HEllo i am having troubles doing some kind of program, i want one to check
another table for begining to end. Something like this:

While (Barcelona.ABPOBL)
While (Pueblos_temp.Pueblos_temp_1)
WHERE (((BARCELONA.ABPOBL)=(Pueblos_temp.Pueblos_temp_1)))
SET (Barcelona.PERTENECE) = 8

Want to compare the first ABPOBL with the first Pueblos_temp_1 to the last
pueblos_temp_1, then the second ABPOBL with the first pueblos_temp_1

and so on
if they are equel i wanto to set Barcelona.PErtenece to 8

how can i traduce this to Access 2003

Thanks
 
Hi Julio

You should be able to do this with a simple update query with an inner join:

Update Barcelona inner join Pueblos_temp
on Barcelona.ABPOBL=Pueblos_temp.Pueblos_temp_1
Set Barcelona.PERTENECE = 8
 
Back
Top