Here is my example:
I am trying to set the value of a text box based on the "Age" field in MyQuery. I have the textbox's Control Source set to =MyFunction(). The report's record source is MyQuery. Here is my function:
Public Function MyFunction() As String
If [MyQuery.Age] = "100" Then
MyFunction = "This guy is old!"
End If
End Function
I just don't know the syntax to reference the age field.
I tried [MyQuery].[Age],[MyQuery]![Age],[MyQuery].[Age].Value, etc...
Help!