Dim strSQL As String
strSQL = "INSERT INTO [Table 3] (BAN, min_date) " & _
"SELECT [NORSNAPADM_NAME_LINK].BAN, Min([NORSNAPADM_NAME_LINK].sys_creation_date) " & _
"FROM [Tbl: Individual Data], [NORSNAPADM_NAME_LINK] " & _
"WHERE [NORSNAPADM_NAME_LINK].BAN = [Tbl: Individual Data].BAN " & _
"GROUP BY [NORSNAPADM_NAME_LINK].BAN"
CurrentDb.Execute strSQL, dbFailOnError
|