I have a form, thirty one fields, labeled ‘one’,‘two’ etc
I want to essentialy do a conditional formatting on those 31 fields, but using vba
the code I have is
Sub colourise() For i = 1 To 31 VarField = SpellNumber(i) Select Case Me.[I]VarField[/I].Value Case Grn Me.[I]VarField[/I].backcolour = vbGreen Case Blu Me.[I]VarField[/I].backcolour = vbBlue Case Else Me.[I]VarField[/I].backcolour = vbWhite End Select Next End Sub
the function SpellNumber turns ‘1’ into ‘one’ etc
Clearly using VarField as a reference in the way I have fails, but how do I get it in there? In excel I could use indirect but I can’t work out what to use in access.