I found my very simple, yet very trouble some mistake.
My code was reading some of the strings as the same which was correct. I just had the same words in a few of my records.
Thanks for letting me know it was right though, it led me in the correct direction!
Code:Dim Colors As Recordset Set dabs = CurrentDb Set Colors = dabs.OpenRecordset("DPBoxesTrays") With Colors .MoveFirst Do Until .EOF Box = !Supply QOH = !QOH If InStr(UCase(Box), UCase("Planting Box")) > 0 Then RedText = QOH ElseIf InStr(UCase(Box), UCase("Lid")) > 0 Then BlueText = QOH ElseIf InStr(UCase(Box), UCase("Top")) = 1 Then YellowText = QOH ElseIf InStr(UCase(Box), UCase("Bottom")) = 1 Then PinkText = QOH ElseIf InStr(UCase(Box), UCase("Spaces")) > 0 Then PurpleText = QOH ElseIf InStr(UCase(Box), UCase("Top Box")) > 1 Then PlaiText = QOH ElseIf InStr(UCase(Box), UCase("Bottom Box")) > 1 Then ShootText = QOH ElseIf InStr(UCase(Box), UCase("Coin")) > 0 Then BlackText = QOH ElseIf InStr(UCase(Box), UCase("Ear")) > 0 Then EarText = QOH ElseIf InStr(UCase(Box), UCase("Large")) > 0 Then LargeText = QOH End If .MoveNext Loop End With Me.Repaint




Reply With Quote