I
Ian Bateman
I am getting this error message when I try to execute this code in my Access
Project (adp), any ideas on what is going wrong? I have ticked 'Microsoft
DAO 3.6 Object Library in References.
It is supposed to be appending and order details record to the table
OrderDetails
Many Thanks
Ian
----
Private Sub AddItem_Click()
Dim dbsMasterplan As Database
Set dbsMasterplan = CurrentDb
Dim MasterplanSQL As String
MasterplanSQL = "INSERT INTO OrderDetails
(OrderID,ProductID,ProductName,UnitPrice,Quantity,Colour) VALUES("
MasterplanSQL = MasterplanSQL & Forms!frm_Orders.OrderID & ", " & ProductID
& ", '" & Product & "', " & SetPrice & ", " & Quantity & ", '" & Description
& "')"
dbsMasterplan.Execute (MasterplanSQL)
End Sub
Project (adp), any ideas on what is going wrong? I have ticked 'Microsoft
DAO 3.6 Object Library in References.
It is supposed to be appending and order details record to the table
OrderDetails
Many Thanks
Ian
----
Private Sub AddItem_Click()
Dim dbsMasterplan As Database
Set dbsMasterplan = CurrentDb
Dim MasterplanSQL As String
MasterplanSQL = "INSERT INTO OrderDetails
(OrderID,ProductID,ProductName,UnitPrice,Quantity,Colour) VALUES("
MasterplanSQL = MasterplanSQL & Forms!frm_Orders.OrderID & ", " & ProductID
& ", '" & Product & "', " & SetPrice & ", " & Quantity & ", '" & Description
& "')"
dbsMasterplan.Execute (MasterplanSQL)
End Sub