I want my code to change the back colour to red (of a form field) if
the name is either "admin" or "meeting" or "holiday".
I tried this;
If rs!ACCOUNTNAME = "Meeting" Then
f("text" & i).BackColor = 255
ElseIf rs!ACCOUNTNAME = "Holiday" Then
f("text" & i).BackColor = 255
ElseIf rs!ACCOUNTNAME = "Admin" Then
f("text" & i).BackColor = 255
This works for all "Meeting" named fields but not the second or third
statements. I then thought I would be able to do an If / Or statement;
ElseIf rs!ACCOUNTNAME = "Holiday" Or "Meeting" or "Admin" Then
f("text" & i).BackColor = 255
But this creates an error. What am I doing wrong?