if i want to make this work for more than 10 pictures what should i change in the code?
for example 20 pictures
Private Sub rating_AfterUpdate()
Dim imgArray(1 To 10) As Byte
If Nz(Me.rating, 0) > 0 And Nz(Me.rating, 0) < 11 Then
For i = LBound(imgArray) To UBound(imgArray)
Me.Controls("imgStar" & i).Visible = (i <= Me.rating)
Next
Else
For i = LBound(imgArray) To UBound(imgArray)
Me.Controls("imgStar" & i).Visible = False
Next
End If
End Sub