Dim StoreNoToUpdate As String Dim Marsha As String StoreNoToUpdate = "ABCXYZ123" Marsha = "hi" db.Execute "Update TblLodgingReport set [MarshaCode]= 'Marsha' where [Store Number ID]= 'ABCXYZ123'"
我正在尝试在“ ABCXYZ123”位置更新“ hi”。但不粘贴“ hi”,而是粘贴“ Marsha”。
尝试:
Dim StoreNoToUpdate As String Dim Marsha As String StoreNoToUpdate = "ABCXYZ123" Marsha = "hi" Db.Execute "Update TblLodgingReport set [MarshaCode]='" & Marsha & "'where [Store Number ID]= 'ABCXYZ123'"