I have a routine hunting for duplicate phone number is a table. I just want to color the duplicate fields., but can' figure out how to change the color.
Here si the code. BTW the table is sorted in ascending sequence on the phone number.
rs("Callno").BackColor = vbRed is. (There is much more that has to be added so I can't use the Find Duplicates wizard.)
How do you set the backcolor of the field in a table?
Here si the code. BTW the table is sorted in ascending sequence on the phone number.
Code:
Do Until rs.EOF
Lastrec = rs("callno") 'Save record for compare
rs.MoveNext 'Next record
Currec = rs("callno") 'Save current record
If Currec = Lastrec Then 'See if both are the same
rs.MovePrevious 'Read previous record
rs("Callno").BackColor = vbRed 'Set color
rs.MoveNext
rs.MoveNext
End If
counterbox = num
num = num + 1
rs.MoveNext
rs("Callno").BackColor = vbRed is. (There is much more that has to be added so I can't use the Find Duplicates wizard.)
How do you set the backcolor of the field in a table?