Private Sub Command14_Click()
Dim a, b As String
Dim d As Integer
a = Me.备件编号
b = Me.周转单位
d = Me.数量
Dim curdb As Database
Set curdb = CurrentDb
curdb.Execute "update 备件库存 set 数量=数量-" & d & ",[b] =[b] -" & d & " where 备件编号='" & a & "'"
不加[b]=[b]-" & d & "可以修改备件库存表中相应‘数量’字段的值。现在想把b从窗体中取下来后,作为备件库存表的字段名在式子中使用,不能用。不知有什么办法达到这个效果?