kodr
Programmer
- Dec 4, 2003
- 368
I'm connecting to an Access database from excel using Microsoft ActiveX Data Objects 2.6
All is good, able to retrieve and add information to my tables just fine.
My problem is this, I have a table (tblA) and it has four fields that are numberical indexes.
Field1 can contain a number between 1 and 5, the same for Field2 thru Field4.
Each possible combination may have upto 24 duplicate records. Is it possible with one query to pull one occurance of each possible combination?
For instance:
1,1,1,1
1,1,1,2
...
1,1,2,1
...
1,2,1,1
etc...
I believe this would be something like 125 records, as opposed to the 3,000 I'm getting now.
My current query is this:
Any ideas?
All is good, able to retrieve and add information to my tables just fine.
My problem is this, I have a table (tblA) and it has four fields that are numberical indexes.
Field1 can contain a number between 1 and 5, the same for Field2 thru Field4.
Each possible combination may have upto 24 duplicate records. Is it possible with one query to pull one occurance of each possible combination?
For instance:
1,1,1,1
1,1,1,2
...
1,1,2,1
...
1,2,1,1
etc...
I believe this would be something like 125 records, as opposed to the 3,000 I'm getting now.
My current query is this:
Code:
sSQL = "SELECT * FROM tblA WHERE Field1=1"
RSET1.Open sSQL, CONN1, adOpenStatic, adLockOptimistic
Any ideas?