Hi,
I'm trying to divide a command
onto multiple lines. When I try to put underscore _
my code turns red and VBA tells me I have an
error expected end of statement.
Can someone please explain how this is done.
code:
DoCmd.RunSQL "INSERT INTO tblInventoryTransactions ([TransactionType],[ProdID], [Quantity],[PurchaseOrderID] )VALUES (" & 1 & ", " & ProductId.Value & "," & Quantity.Value & " , " & PurchaseID.Value & ");"
I'm trying to divide a command
onto multiple lines. When I try to put underscore _
my code turns red and VBA tells me I have an
error expected end of statement.
Can someone please explain how this is done.
code:
DoCmd.RunSQL "INSERT INTO tblInventoryTransactions ([TransactionType],[ProdID], [Quantity],[PurchaseOrderID] )VALUES (" & 1 & ", " & ProductId.Value & "," & Quantity.Value & " , " & PurchaseID.Value & ");"