G-day
New to access and recently developed a successful database for work analysing KPI results etc. Now just for a learning experience re: analysing LOTTO results, I want to develop a form to changes the back colour of a text box when the number in it is the same as one entered in another text box (so I have a static unchanging 18 rows of 6 numbers in each in a table and one row of six numbers that change each week depending on the LOTTO draw and are entered in via text boxes on the form]. I can do this with;
Dim Num1 As Long
Num1 = Me.No1 (No1 = first weekly drawn number)
If Me.n1 = Num1 Then (n1 = column one of the 18 rows)
n1.BackColor = vbGreen
End If
My lotto card is 18 lines long and I have used a continuous form to have all the 18 lines load into the form from a table. So when I put the first drawn number into Me.No1 text box and if it matches the first number in the first row of Me.n1 text box the whole 18 rows change colour instead of only the ones that match Me.No1. Any help would be welcome.