Function Code_Fragment_7_17()

Dim dbs As Database
Dim Part_A, Part_B, Part_C, Part_D, Part_E As String

Set dbs = CurrentDb()


Part_A = "INSERT INTO INCUMBENTS ( SSN, PCN, START_DATE, END_DATE ) " _
       & "SELECT " & Chr(34) & "111223333" & Chr(34) & ", " & Chr(34) & "341288" & Chr(34) & ", " _
       & "START_DATE, #01/01/1997# " _
       & "FROM INCUMBENTS " _
       & "WHERE SSN = " & Chr(34) & "111223333" & Chr(34) & " " _
       & "AND START_DATE < #01/01/1997# " _
       & "AND END_DATE > #01/01/1997#;"

Part_B = "INSERT INTO INCUMBENTS ( SSN, PCN, START_DATE, END_DATE ) " _
       & "SELECT " & Chr(34) & "111223333" & Chr(34) & ", PCN, " _
       & "#01/01/1998#, END_DATE " _
       & "FROM INCUMBENTS " _
       & "WHERE SSN = " & Chr(34) & "111223333" & Chr(34) & " " _
       & "AND START_DATE < #01/01/1998# " _
       & "AND END_DATE > #01/01/1998#; "

Part_C = " UPDATE INCUMBENTS SET PCN = " & Chr(34) & "341288" & Chr(34) & " " _
       & "WHERE SSN = " & Chr(34) & "111223333" & Chr(34) & " " _
       & "AND START_DATE < #01/01/1998# " _
       & "AND END_DATE > #01/01/1997#;"

Part_D = "UPDATE INCUMBENTS SET START_DATE = #01/01/1997# " _
       & "WHERE SSN = " & Chr(34) & "111223333" & Chr(34) & " " _
       & "AND START_DATE < #01/01/1997# " _
       & "AND END_DATE > #01/01/1997#;"

Part_E = "UPDATE INCUMBENTS SET END_DATE = #01/01/1998# " _
       & "WHERE SSN = " & Chr(34) & "111223333" & Chr(34) & " " _
       & "AND START_DATE < #01/01/1998# " _
       & "AND END_DATE > #01/01/1998#;"

dbs.Execute (Part_A)
dbs.Execute (Part_B)
dbs.Execute (Part_C)
dbs.Execute (Part_D)
dbs.Execute (Part_E)

End Function



