I have the following code and I keep getting an error.
Dim ctlTB As Control
Dim strTest as String
intGry = 12632256
For intI = 1 To 9
strA = "Forms!frmmatchplay!txtTeamAHole" & intI
strB = "Forms!frmmatchplay!txtTeamBHole" & intI
intScore1 = Eval(strA)
intScore2 = Eval(strB)
If intScore1 = intScore2 Then
intHolesEven = intHolesEven + 1
strE = "Hole Halved"
strTest = "Forms!frmMatchPlay!txtTeamAHole" & intI
Set ctlTB = strTest
ctlTB.BackColor = intGry
I am attempting to loop through intI and change the background color of
a text box "txtTeamAHole1" to Hole9