Link to home
Start Free TrialLog in
Avatar of KollBrian
KollBrian

asked on

update table record from xls using "if"

Hi Team,

I have an XLS sheet that i have been using to key in data (using copy/paste to get the repeatitive info in quickly) that I use in the warehouse.  the xls has all the same columns that my table has.

what I need to do is a simple "find", then "update" using a command button on a form.

in particular I want to find "file1.serial_#"  in table1.serial_#, and then update table1.box_id with file1.box_id


or in english, have the button go record by record finding a match for the data in column J in the datatable column then update the "new" box id number in the table with what is in the xls column
TEST1.accdb
sample1.xls
Avatar of KollBrian
KollBrian

ASKER

apologies, the serial number is in column K in the sample1 excel file.
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Peter, with your help I was able to get the update working perfectly.  Took a bit of research on the syntax but now that I have it this will make my life much easier :)
Update tbl_box_detail inner join  tbl_test_link on tbl_box_detail.[serial_#]=tbl_test_link.[serial_#]
SET tbl_Box_Detail.Box_ID=tbl_test_link.box_id, tbl_Box_Detail.PALLET_ID=tbl_test_link.pallet_id  
Where tbl_box_detail.[serial_#]=tbl_test_link.[serial_#]