I'm attempting to build a form to be used as an agenda generator with two subforms in datasheet view: one contains a list of all active projects, and the other is a list of projects to be discussed. What I'd like to have happen is to be able to double-click the project name in the active list and have it move into the to be discussed one. I do not want the record to be deleted from the active list.
I have an event set for the double-click and an append query to move the data and it works, but it brings up the parameter window when I try to run it. When I manually type the record name in it works fine, but I'd like to avoid having to do this.
I've written the following code in VBA for the double-click event:
Code:
Sub Project_Name_DblClick(Cancel As Integer)
DoCmd.SetWarnings flase
DoCmd.OpenQuery "AgendaAppend"
End Sub
And the append query is the following SQL:
Code:
INSERT INTO AgendaList ( ProjectName, Category )
SELECT Projects.ProjectName, Projects.Type
FROM Projects
WHERE Projects.ProjectName=forms!AgendaListSubform!ProjectName
ORDER BY Projects.Type;
Any help would be appreciated!