Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

matching records

Status
Not open for further replies.

patweb

Programmer
Apr 17, 2003
174
0
0
BE
i have an id to solve the question below, but just to know if there are eventually others or better or quicker.
my data is coming from excel (to access)
1. excel1 - colomn1 : idarticles colomn2 : description number records : 100
2. excel2 - colomn1 : idarticles colomn2 : description number records : 20

excel2 is an update of the description. the goal is to update the description in excel1 for each id of excel2.
So I need to math.

my solution : two recordset, loop, if the id is equal then update the description.
 
I don't think you need a loop with 2 recordset. It might be simpler to run a sql update command. Try something similar to:

dim tmpS as string
tmpS = "UPDATE excel1 INNER JOIN excel2 ON excel1.id = excel2.id SET excel1.description = [excel2]![descriptio]"
docmd.runsql tmpS

My 2 cents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top