@Bob,
Sorry I've been MIA. My profile in Win7 went bad - managed to save most things.. Had to reformat, install Win 7, over 300 "Updates", install programs (not done yet), etc.
Still at 50%....... but gaining ground.
Try adding the lines (in BLUE):
Code:
Dim tmp As Integer 'holds sum of differences between fields of the two record sets
Dim RecAdded As Integer
Dim X As Integer ' user provided from form
Dim Y As Integer ' user provided from form
Dim Z As Integer ' user provided from form
Dim bSimilar As Boolean 'are T2 records/fields similar to T1 record/fields
Dim NewPK As Long 'PK of new record added to Table2
'used for debugging/tracing records
Dim T1RC As Long
Dim T2RC As Long
Dim T1Count As Long
Dim T2Count As Long
Code:
If Not bSimilar Then 'no records in common between T1 record and ALL T2 - add record to T2
With t2
.AddNew
NewPK = !Table2ID_PK
!PIC1 = t1!PIC1
!PIC2 = t1!PIC2
!PIC3 = t1!PIC3
!PIC4 = t1!PIC4
!PIC5 = t1!PIC5
!PIC6 = t1!PIC6
!PIC7 = t1!PIC7
!PIC8 = t1!PIC8
!PIC9 = t1!PIC9
!PIC10 = t1!PIC10
.Update
End With
'###############################################
'Now Update Table1 non-similar record field with NEW PK added to table2
t1.Edit
t1!Table2ID_FK = NewPK
t1.Update
'###############################################
RecAdded = RecAdded + 1
If RecAdded Mod 10 = 0 Then
Me.tbT2Added = RecAdded
Me.Repaint
End If
End If
If a record in Table1 is checked against all records in Table2 and there are NO similar records, the record in Table1 is added to Table2 and the NEW Table2 ID is added to the record in Table1
And maybe post a dB with the changed table1.LocalTime field????
HOW did I miss that the field "LocalTime" was a text field and not a Date/time?????