|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
原帖由 happypie2008 于 2011-2-25 13:20 发表
求助:
见附件,有J300,SGM308两个基本表的信息,PN(Part Number)为主关键字,如果更新WH_Address里面的PN,WH_Address,version(为版本日期),怎样才能实现J300,SGM308这两个表里面的version也更新?
谢谢
J300表的PN字段应更改与WH_Address表一致,即为文本类型。
Sub UpdateVersion()
With CurrentDb
.Execute "UPDATE J300 AS A INNER JOIN WH_Address AS B ON A.PN = B.PN " _
& "SET A.Version = B.Version"
.Execute "UPDATE SGM308 AS A INNER JOIN WH_Address AS B ON A.PN = B.PN " _
& "SET A.Version = B.Version"
End With
End Sub |
|