Hi Guys
i can't see where i am going wrong with this code
Dim str As String
str = "UPDATE SOIDETAILS SET ORDERQTY = forms!SOIAddDetails!QtyTXTBox WHERE WORKORDERID =" & Forms!SOIAddDetails!WorkOrderTXTBox
DoCmd.RunSQL str
what i am trying to do is update the "ORDERQTY" feild in the "SOIDetails" table with the value held on the AddSOIDetails forms "QtyTXTBox" text box where the WORKORDERID is equal to the value held in the WorkOrderTXTBox
if i remove this part "WHERE WORKORDERID =" & Forms!SOIAddDetails!WorkOrderTXTBox" all the OrderQTY in the SOIDetails table are updated.
if i leave the code in i get this error
Error 3464 (Data Type Mismatch in Criteria Expresion)
any help would be brill as this is my first attempt at coding sql in VBA and im getting abit lost
many thanks
Steve