Hi
I have a Form that as a Subform (populated by a query). The subform query uses the values of the form combo boxes.
I have a command button in the form that is supposed to duplicate the record selected by the user (The duplication is there if the user wants to add almost the same item but the item is not available in the choises).
For the moment I use this code :
RunCommand acCmdSelectRecord
RunCommand acCmdCopy
RunCommand acCmdPasteAppend
But this only copies what the user sees in the subform forgetting the hided fields like area, section, discipline. My first guess was to change the DoCmd.DoMenuItem to RunCommand but that didn't change anything.
My second guess was to do this :
RunCommand acCmdSelectRecord
(Get Item Id of old record)
RunCommand acCmdCopy
RunCommand acCmdPasteAppend
(Get item Id of new record)
(Copy missing fields of old record in new record)
But I can't find the way to get the item Id for the selected record old or new
Does anyone have an idea of what I could do?
thanks
For more info on my DB, u can look at my old post :
http://www.access-programmers.co.uk/forums/showthread.php?t=144559
I have a Form that as a Subform (populated by a query). The subform query uses the values of the form combo boxes.
I have a command button in the form that is supposed to duplicate the record selected by the user (The duplication is there if the user wants to add almost the same item but the item is not available in the choises).
For the moment I use this code :
RunCommand acCmdSelectRecord
RunCommand acCmdCopy
RunCommand acCmdPasteAppend
But this only copies what the user sees in the subform forgetting the hided fields like area, section, discipline. My first guess was to change the DoCmd.DoMenuItem to RunCommand but that didn't change anything.
My second guess was to do this :
RunCommand acCmdSelectRecord
(Get Item Id of old record)
RunCommand acCmdCopy
RunCommand acCmdPasteAppend
(Get item Id of new record)
(Copy missing fields of old record in new record)
But I can't find the way to get the item Id for the selected record old or new
Does anyone have an idea of what I could do?
thanks
For more info on my DB, u can look at my old post :
http://www.access-programmers.co.uk/forums/showthread.php?t=144559