J
Jarryd
Hello,
Could someone please tell me what is wrong with my code:
----------------------------------------------------------------------------------
Private Sub btnApply_Click()
Dim Weight As Double
Dim Quantity As Long
Dim ordLink As Long
Dim qrySplit As String
Dim rstTRP As DAO.Recordset
Dim db As DAO.Database
ordLink = Form_Orders.txtOrd_Det_Lnk
Quantity = Form_Order_Details.txtQty - txtRolls
Weight = Form_Order_Details.txtWeight - txtkilos
qrySplit = "INSERT INTO Order_Details ( Orders_Link, Quantity, Weight )
VALUES (" + ordLink + ", " + Quantity + ", " + Weight + ");"
DoCmd.RunSQL ("qrySplit")
End Sub
------------------------------------------------------------------------------
I have checked the table Order_Details and the types are correct - Weight is
Double, Quanitity is Long Integer, Orders_Link is Long Integer.
TIA,
Jarryd
Could someone please tell me what is wrong with my code:
----------------------------------------------------------------------------------
Private Sub btnApply_Click()
Dim Weight As Double
Dim Quantity As Long
Dim ordLink As Long
Dim qrySplit As String
Dim rstTRP As DAO.Recordset
Dim db As DAO.Database
ordLink = Form_Orders.txtOrd_Det_Lnk
Quantity = Form_Order_Details.txtQty - txtRolls
Weight = Form_Order_Details.txtWeight - txtkilos
qrySplit = "INSERT INTO Order_Details ( Orders_Link, Quantity, Weight )
VALUES (" + ordLink + ", " + Quantity + ", " + Weight + ");"
DoCmd.RunSQL ("qrySplit")
End Sub
------------------------------------------------------------------------------
I have checked the table Order_Details and the types are correct - Weight is
Double, Quanitity is Long Integer, Orders_Link is Long Integer.
TIA,
Jarryd