Here is the code I used:
If Me.RMA_TO_MFG_VIA.Value = "UPS GROUND" And IsNullRMA_TO_MFG_DATE) Then
Me!RMA_TO_MFG_VIA.Visible = False
Me.NOT_APPLICABLE_LABEL.Visible = True
You still have full stops after the Me bit. You must use an exclamation mark. So your code should read:
If Me!RMA_TO_MFG_VIA.Value = "UPS GROUND" And IsNull(Me!RMA_TO_MFG_DATE.Value) Then
Me!RMA_TO_MFG_VIA.Visible = False
Me!NOT_APPLICABLE_LABEL.Visible = True
Also, the report you are changing the properties on must be open. If your VB is in one of the reports' events then you should be ok. However, if the report is open but you are running code from say a button on a form, the you must refer to the reports properties by their full description e.g.
The bang ("!") and dot (".") identifier operators help describe the relationships among collections, objects, and properties in an expression. They indicate that one part of an expression belongs to another.
In general, you follow the bang with the name of something you created: a form, report, or control. The bang also indicates that the item to follow is an element of a collection. You'll usually follow the dot with a property, collection, or method name. Actually, under the covers, the bang separator really says, "retrieve the following object from the default collection of the parent object." (See the section "Using Default Collections" later in this chapter.) For example, when working with forms, you can refer to a control on a form like this:
Set ctl = Forms("frmTest").Controls("txtName")
or, because Controls is the default collection of a form, you can abbreviate that as either of the following:
Set ctl = Forms("frmTest")("txtName")
Set ctl = Forms("frmTest")!txtName
You can also think of the uses of these operators this way: a bang (or parentheses and quotes) separates an object from the collection it's in (a field in a table, a form in the Forms collection, a control on a form), while a dot separates an object from a property, method, or collection of that object.
If you refer back to Table 6.2, you'll see that there's always an alternative to using the bang operator: you can use the parentheses and quotes syntax. For example, these two statements refer to exactly the same property:
It turns out that, behind the scenes, the former style of dot-and-bang reference is translated to the latter style of parentheses-and-quotes reference when you execute such a statement. This means that, although using the bang operator will save you a bit of typing, you'll pay for it in a speed penalty. Our recommendation, and the style we've followed throughout this book, is to always use the parentheses and quotes format for referring to a member of a collection unless it's absolutely necessary to use the bang operator. In addition, if the object to which you're referring contains spaces (or other nonstandard characters), you'll have to treat these names specially when using the bang syntax—you'll need to surround the name in square brackets. If you use the parentheses/quotes syntax, all names are treated equally.
WARNING One place where the bang operator is necessary is in query parameters that refer to form fields. That is, you cannot avoid the Forms!FormName!ControlName syntax in this case.
Tip It's a hard habit to break—we've been using "!" since Access 1. But the fact is, except in a very few places (query parameters is the one that comes to mind) you needn't ever use a bang and should probably think about weaning yourself from this syntax if you currently use it. It's important that you understand what it's doing and what it means when you see it, but we suggest you not use it in your VBA code.