I am trying to extract records from an access database using Excel VBA with using an SQL statement. Using Excel VBA with an SQL SELECT statement I can extract records using the WHERE clause. Now I am trying to select PAIRS of records from my database but I am not sure how I can achieve this.
Access Table: (NB: there are other columns in the table)
Date DTE Name Sc
41668 AAA425 AdamJ 98
41669 ABC500 JohnB 85
41689 ADE450 AdamJ 56
41789 AFF350 AdamJ 74
I want to select pairs based on Name
E.g.
Date DTE Name Sc Date DTE Name Sc
41668 AAA425 AdamJ 98 41689 ADE450 AdamJ 56
41668 AAA425 AdamJ 98 41789 AFF350 AdamJ 74
41689 ADE450 AdamJ 56 41789 AFF350 AdamJ 74
Then I want to filter/select based on the first DTE
Date DTE Name Sc Date DTE Name Sc
41668 AAA425 AdamJ 98 41689 ADE450 AdamJ 56
41668 AAA425 AdamJ 98 41789 AFF350 AdamJ 74
Can anyone point me in the right direction to how I can achieve this?