|
本帖最后由 todaynew 于 2014-11-28 15:02 编辑
function MoveRe(原仓库号 as string,新仓库号 as string,设备 as string,数量 as integer)
dim ssql as string
ssql="insert into 库存表 (仓库号,设备,数量) values ('"
ssql=ssql & 新仓库号 & "','"
ssql=ssql & 设备 & "',"
ssql=ssql & 数量 & ")"
CurrentDb.Execute ssql
ssql="delete * from 库存表 where 仓库号='" & 原仓库号 & "' and 设备='" & 设备 & "'"
CurrentDb.Execute ssql
end function
或者:
function MoveRe(原仓库号 as string,新仓库号 as string,设备 as string,数量 as integer)
dim ssql as string
ssql="update 库存表 set 仓库号='" & 新仓库号 & "'"
ssql=ssql & " where 仓库号='" & 原仓库号 & "' and 设备='" & 设备 & "'"
CurrentDb.Execute ssql
end function
|
|