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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare spreadsheet to table and update table

Status
Not open for further replies.

ldoublee75

Technical User
Mar 17, 2006
8
US
Thanks for any help you can give me, i appreciate it!
I recieve a spreadsheet once a week of employees salaries, about 125 people. Right now I compare the names and salaries on the spreadsheet to the names and salaries i have in a table in a database. Obviously, if a salary has been updated i have to update my database with the new salary and the effective date.
Is there anyway i can automate this process?
Once again i appreciate any help you guys can give. I have searched the archives, but haven't had much luck.
ldoublee
 
I'll assume that you always have 125 people. So you'll have your Old table and import the spreadsheet to a new table. I called mine Salary and Salary_New. Both have EmployeeID as the first field. Then the old table has salary, the new table has salarynew. Create an update query. Add both tables to the query - they should be automatically connected through Employeeid. Bring down EmployeeID and Salary from the first table. Change the query to an update. Where is says UpdateTo, underneath Salary, put in

IIf([Salary]=[SalaryNew],[Salary],[SalaryNew])

Also, place another field in the query and type in Expr1:Date()
Change Expr1 to the Date field name in your old table. It will place the run date there.
 
Thanks, I'm going to try it right now.
I appreciate the information!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top