Hello,
I am receiving a compile error: Syntax Error when executing this code on my save button. The debugger highlights what I have highlighted below. Any advice would be greatly appreciated.
Private Sub Command9_Click()
On Error GoTo Command9_Click_Err
DoCmd.SetWarnings False
' Inserts into Inv_Transactions the Prod_ID of Product Added. This is so when go back to Products page it displays in the drop down
DoCmd.RunSQL "INSERT INTO INV_TRANSACTIONS ( PROD_ID )"
SELECT Products.Prod_ID "
DoCmd.SaveObject acForm, "ADD_PRODUCTS"
' Clears out form, ready for next addition.
DoCmd.GoToRecord acForm, "ADD_PRODUCTS", acNewR
Thanks,
kacy
________
Tasty_squirt
I am receiving a compile error: Syntax Error when executing this code on my save button. The debugger highlights what I have highlighted below. Any advice would be greatly appreciated.
Private Sub Command9_Click()
On Error GoTo Command9_Click_Err
DoCmd.SetWarnings False
' Inserts into Inv_Transactions the Prod_ID of Product Added. This is so when go back to Products page it displays in the drop down
DoCmd.RunSQL "INSERT INTO INV_TRANSACTIONS ( PROD_ID )"
SELECT Products.Prod_ID "
DoCmd.SaveObject acForm, "ADD_PRODUCTS"
' Clears out form, ready for next addition.
DoCmd.GoToRecord acForm, "ADD_PRODUCTS", acNewR
Thanks,
kacy
________
Tasty_squirt
Last edited: