I have a problem with a query in access that I cant seem to figure out. I have a form named frmRecruitment with a subform named sfrmParticipant. At the moment I am using an append query to append records from 'sfrmParticipant' to 'frmIntervention' using a button on a main form 'frmRecruitment'.
This append query appends all the records from
'sfrmParticipant' to 'frmIntervention' but I only want to append the record that is displayed as the current record in the form or the last record from tblParticipant into tblIntervention and by using the button on the form append only that very last record.
I modified the code to do this:
Private Sub Command31_Click() DoCmd.RunSQL "INSERT into [tblIntervention]([participantID]) VALUES (participantID)" End Sub
and yes it appends only the information being displayed or the very last record from tblParticipant into tblIntervention but it prompts me to enter the participantID in order to do it.
How do I modify the append query to only append the form record with out promting me and having to enter the participant ID manually?
Thanks for your help!