Dim idlist ' get a list of all ID values For i = 0 to DataGrid1.Selection.Count - 1 idlist = idlist & "'" & DataGrid1.Selection(i) & "'," Next ' trim off trailing comma If Len(idlist) > 1 Then idlist = Left(idlist, Len(idlist)-1) ' now open the recordset Set rs = Application.GetNewConnection.Execute("select * from " & Left(DataGrid1.KeyField, Len(DataGrid1.KeyField)-2) & " where " & DataGrid1.KeyField & " in (" & idlist & ")") ' now do what you want with "rs" - this is a recordset of the selected rows