S
sam
Hi all,
I am working on Access 2003,
I have report generated by query results I want to change the font
color of the records which are repeating..
like with same txtZipcode the all records with multiple zipcodes are
Red and the Last one in that list is Green.
so if zipcode is 98789 then all records with this zipcode are Red and
last of them should be green.
This is my code.. as shown bolded is changes the color of whole column
insted of each record..
Do Until rst.EOF
deptCount = rst.Fields(0)
ziptmp = rst.Fields(1)
For i = 1 To deptCount
rst2.MoveFirst
While Not rst2.EOF
If (rst2.Fields(1).Value = ziptmp) Then
Me!txtZip.ForeColor = Color1
Else
Me!txtZip.ForeColor = Color
End If
rst2.MoveNext
Wend
Next i
rst.MoveNext
Loop
I hope its understandable...!!
Thanks!!
Sam
I am working on Access 2003,
I have report generated by query results I want to change the font
color of the records which are repeating..
like with same txtZipcode the all records with multiple zipcodes are
Red and the Last one in that list is Green.
so if zipcode is 98789 then all records with this zipcode are Red and
last of them should be green.
This is my code.. as shown bolded is changes the color of whole column
insted of each record..
Do Until rst.EOF
deptCount = rst.Fields(0)
ziptmp = rst.Fields(1)
For i = 1 To deptCount
rst2.MoveFirst
While Not rst2.EOF
If (rst2.Fields(1).Value = ziptmp) Then
Me!txtZip.ForeColor = Color1
Else
Me!txtZip.ForeColor = Color
End If
rst2.MoveNext
Wend
Next i
rst.MoveNext
Loop
I hope its understandable...!!
Thanks!!
Sam