sql - Updating a record on another table that corresponds to the same record -


i trying update record on table. have first table infodetailstable has bunch of records 1 of values being kitnumber. in infodetailstable table updating checkboxes, , when change supposed update reason value of table, infotable. i'm not quite sure how work update statement can update specific infotable record based on record changed in infodetailstable. here code:

currentdb.execute " update infotable set reason = 'blah' kitnumber = " & infodetailstable.kitnumber 

so infotable has reason , kitnumber while infodetails has kitnumber because in relationship kitnumber on infotable primary key. if great. thank you

edit: here more code maybe help.

if usbcheck = true , threewaycheck = true , car1check = true , car2check = true  currentdb.execute " update infotable set reason = '' kitnumber = " & infodetailstable.kitnumber elseif usbcheck = false or threewaycheck = false or car1check = false or car2check = false  currentdb.execute " update infotable set reason = 'blah' kitnumber = " & infodetailstable.kitnumber end if  forms!search!info.form.requery 

if edit code currentdb.execute " update infotable set reason = 'blah' " work out fine, 'blah' in updated every record, want in record updated in infodetailstable

use fields:

currentdb.execute " update infotable set reason = 'blah' kitnumber = " & me.kitnumber 

when working code current form, need reference me. if not work still provide link , @ it.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -