Hi. Problem is that you are trying to compare the value of TAGed to a constant called Yes  which simply does not exist in VBA. This results in the error you are experiencing about missing variables.
If TAGed is a Boolean value (one which is defined in the underlying table as a Yes/No field) its values can be 1 (represented by the constant True) or 0 (represented by the constant False.
You can test its value in a number of ways, all equivalent:
 If Me.TAGed = True Then X Else Y

If Me.TAGed = 1 Then X Else Y

If Me.TAGed Then X Else Y
It is the last of these I would recommend to you, as it is redundant to check a value of True or False against the constant True.
Stewart