首先,我对 VBA 代码几乎一无所知。我在这里要做的是从表单和子表单中获取信息,并将其作为新记录输入到设置为子表单记录源的表中。
错误代码为:运行时错误'3075':
查询表达式 'GENERAL METAL (CUBEX)' 中的语法错误(缺少运算符)。
我也为它的混乱程度道歉。老实说,我只是想复制我在 YouTube 视频中看到的内容,这代表了我正在尝试做的事情。
CurrentDb.Execute "INSERT INTO workingorders(customer, partname, partnumber, metal, grade, unitweight, Process, subcontract, MoldDescription, moldlocation, specialconcerns, shippinginst, datereq, orderdate, qtyordered, qtycast) " & _
" VALUES(" & Me.customer & ", '" & Me.partname & "','" & Me.partnumber & "','" & Me.metal & "','" & Me.grade & "','" & Me.unitweight & "','" & Me.Process & "','" & Me.subcontract & "','" & Me.MoldDescription & "','" & Me.moldlocation & _
Me.specialconcerns & "','" & Me.shippinginst & "','" & Me.datereq & "','" & Me.orderdate & "','" & Me.qtyordered & "','" & Me.qtycast & "')"