I'm developing a package using Access 2010
I have a Form that contains almost all fields of the Table and is used as main form for data input. With the purpose of speed up the input of similar records, I have put a Button to duplicate the current record; here the code:
Private Sub Comando78_Click()
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.GoToRecord , , acNewRec
DoCmd.RunCommand acCmdPaste
cboGoToProduct = Null
End Sub
The button works properly when the application is used with Access 2010.
But when I do create a package using Package Sol wizard and the package is used through MS Access Runtime, the click on duplicate record button produce a Runtime error and the package shut down.
Is there anything wrong in my code?
Please note that the row 'cboGoToProduct = Null' is just to clear a combo box that is filled with characters when I click duplicate records button and the runtime error occours with or without that code row
Thanks for any advise.
I have a Form that contains almost all fields of the Table and is used as main form for data input. With the purpose of speed up the input of similar records, I have put a Button to duplicate the current record; here the code:
Private Sub Comando78_Click()
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.GoToRecord , , acNewRec
DoCmd.RunCommand acCmdPaste
cboGoToProduct = Null
End Sub
The button works properly when the application is used with Access 2010.
But when I do create a package using Package Sol wizard and the package is used through MS Access Runtime, the click on duplicate record button produce a Runtime error and the package shut down.
Is there anything wrong in my code?
Please note that the row 'cboGoToProduct = Null' is just to clear a combo box that is filled with characters when I click duplicate records button and the runtime error occours with or without that code row
Thanks for any advise.