Hello,
I am not surehow to properly ask this question but I will try my best. I have a form in which I have included a sub form (frmActivity_List and sfmActivity_List respectively), the sub-form is a list box that will show the specific User (unless they are an admin) only their entries into the database/table. What I would like to do is be able to have the User double click a record and have the selected record entry open for editing by the user. The script I am using is;
Code:
Private Sub Form_DblClick(Cancel As Integer)
DoCmd.Close acForm, "frmActivity_List", acSaveYes
'DoCmd.OpenForm "frmDaily", acNormal, , "DID = " & Me.DID, , , MCreatedBy
DoCmd.OpenForm "frmDaily", , , "DID=" & Me.DID, , , txtUserID
End Sub
I have this script in both the frmActivity_List and sfmActivity_List code windows (hope I said that correctly). The code in a way kind of works because it will open the parent form for editing however it only only picks up the first form in the list box and not the record I have selected. What I mean is lets say there are five records showing in the list box and I select the fourth record in the list. The code runswithout error (amazingly) however when the record opens it is the first record in the list and not the one I selected.
How can I correct this so that the record that is selected is the one that opens?