Question : SQL for first record with 2 columns that might indicate which is first

I use a logging application for ham radio which runs on top of MS Access. The record for each contact is all in 1 table. The are 2 ways to confirm a contact - Paper or Electronic. I would like to generate a report of the first confirmation (called a QSL - not be confused with SQL) for each country and by which QSL method (Paper or Electronic) it was confirmed by. The table name is
TABLE_HRD_CONTACTS_V01

The relevant columns are:
COL_CALL - the call sign of the operator I made a contact with
COL_TIME_ON - the date/time of the contact, not the confirmation
COL_COUNTRY - the country the operator is located in
COL_QSL_RCVD - contains a Y if a paper confirmation was received
COL_QSLRDATE - contains the date a paper confirmation was received
COL_LOTW_QSL_RCVD - contains a Y if an electronic confirmation was received
COL_LOTW_QSLRDATE - contains the date an electronic confirmation was received

A record in the table can be confirmed by neither method, by either method, or by both methods.  

I would like to see the results sorted in desc order of the confirmation date. If a record was confirmed by both methods I would like to only see the first (oldest) record based on the confirmation date for each country, not the contact date. The contact date/time (COL_TIME_ON) should be used if there are multiple records found for the same country on the same date. COL_CALL is just doe display to help me identify the record and I don't think is used in the criteria.

Let me know if there's any further info that would help.



Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
Sample data with COL_ removed from column names and time not shown in TIME_ON:

CALL  TIME_ON    COUNTRY QSL_RCVD QSLRDATE   LOTW_QSL_RCVD LOTW_QSLRDATE
----  -------    ------- -------- --------   ------------- -------------
G1XXX 12/8/2008  ENGLAND                     Y             11/5/2009
G1XXX 1/9/2009   ENGLAND                     Y             11/5/2009
G2XXX 10/9/2009  ENGLAND                     Y             11/10/2009

CO8XX 9/24/2009  CUBA    Y        11/2/2009 
CO9XX 10/25/2009 CUBA                        Y             11/10/2009

K1XX  9/1/2008   US
K2XX  8/1/2009   US      Y        11/1/2009  Y             10/24/2009
K3XX  8/15/2009  US      Y        10/25/2009 
K4XX  8/2/2009   US                          Y             10/24/2009

SP2XX 11/22/2008 POLAND                      Y             10/2/2009
SP2XX 11/23/2008 POLAND  Y        10/1/2009
SP3XX 11/24/2008 POLAND  Y        9/28/2009  
SP3XX 11/25/2008 POLAND                      Y             10/1/2009


Sample report based on the above data (I think if I did it right):

COL_CALL  COL_TIME_ON  COL_COUNTRY  COL_METHOD  COL_QSL_DATE
--------  -----------  -----------  ----------  ------------
G1XXX     12/8/2008    ENGLAND      Electronic  11/5/2009
CO8XX     9/24/2009    CUBA         Paper       11/2/2009
K2XX      8/1/2009     US           Electronic  10/24/2009
SP3XX     11/24/2008   POLAND       Paper       9/28/2009

Answer : SQL for first record with 2 columns that might indicate which is first

Hope you have Access 2007. I am not sure if older Access engine can process this query:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
SELECT t.COL_CALL, t.COL_TIME_ON, t.COL_COUNTRY, 
       IIF(t.COL_QSL_RCVD="Y" And COL_QSLRDATE = t3.FirstConfirmation, "Paper", "Electronic") As COL_METHOD, 
       t3.FirstConfirmation As COL_QSLDATE
  FROM TABLE_HRD_CONTACTS_V01 t
  INNER JOIN (
       SELECT t1.COL_COUNTRY, MIN(t1.COL_TIME_ON) As FirstContact, MIN(t2.MinDate) As FirstConfirmation
         FROM TABLE_HRD_CONTACTS_V01 t1
         INNER JOIN (
            SELECT COL_COUNTRY, Min(IIf(COL_QSLRDATE
           
Random Solutions  
 
programming4us programming4us