Inserting current forms record 'primary id' number into table so I can open a new form linked on current forms id
Posted on 2011-05-11
I have a form with a subform in datasheet view. What I want to be able to do, is to double click on a subforms "SiteSubmittedID" (Primary key- autonumber) record and open a new form (frmComments), filtered on the current SiteSubmittedID that I double clicked on.
This is where I need code I guess? Obviously, I need to insert all the SiteSubmittedID's into the table behind frmComments so that it can then open to the right record through vba? The second part of the code needs to ensure that this vba routine doesn't duplicate the record every time the user double clicks that particular line item.
Once in the comments form though, a user should be able to add more than 1 comment for each SiteSubmittedID in the table behind frmComments.