this is my code for on double click of the list box. i'm populating it using the row soucre. SELECT DISTINCT UnDecided.ID, UnDecided.Hardware FROM UnDecided ORDER BY UnDecided.ID DESC;
when i double click on the list box it will open the right record but when i check the table it was supposed to copy into i see it has copied all the rows instead of the selected one.
any thoughts as to what i may be doing wrong?
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim D As DAO.Database, R As DAO.Recordset, Q As DAO.QueryDef
Set D = CurrentDb
Set R = D.OpenRecordset("Undecided"
Set Q = D.CreateQueryDef(""
Q.SQL = "INSERT INTO AddUndecided SELECT * FROM Undecided WHERE ID=[ID];"
Q.Execute
DoCmd.SetWarnings True
when i double click on the list box it will open the right record but when i check the table it was supposed to copy into i see it has copied all the rows instead of the selected one.
any thoughts as to what i may be doing wrong?
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim D As DAO.Database, R As DAO.Recordset, Q As DAO.QueryDef
Set D = CurrentDb
Set R = D.OpenRecordset("Undecided"
Set Q = D.CreateQueryDef(""
Q.SQL = "INSERT INTO AddUndecided SELECT * FROM Undecided WHERE ID=[ID];"
Q.Execute
DoCmd.SetWarnings True