John,
I did make a break point and found out that it contains nothing. Maybe I
need to do this another way. Let me give you more detail.
I have a report that is opening by a macro. The macro opens the report
and
sets the filter. I want to change either a text box or a label caption in
my
title to say "Internal References". What can I use in the macro after the
report opens to tell it to place the title in the label? I tried SetValue
but that didn't work. I don't know what else I can do. I have about
fifteen
macros that open the report and need different titles depending on each
macro.
Any help would be greatly appreciated as I have spent too much time of
trying to figure this one out.
Thanks John,
Debra Ann
--
Debra Ann
John Spencer said:
Perhaps Me.Filter isn't what you think it is. It is possible that the
apostrophes got changed to quotation marks, or that the Parentheses are
not
there, or ...
Try adding a debug.print statement, msgbox, or setting a break point on
the
code to check the value.
Msgbox "The Filter is " & me.Filter
If Me.Filter = "([Type] = 'IR')" Then
Me.lblHeading.Caption = "Internal References"
Else
Me.lblHeading.Caption = "New Activities Report"
End If
Debra Ann said:
I have the following code but I am doing something wrong with the "if
me.fitler" part of the statemenet since it always comes up with the
label
New
Activities Report even when it is an Internal Reference. What is wrong
with
the syntax?
If Me.Filter = "([Type] = 'IR')" Then
Me.lblHeading.Caption = "Internal References"
Else
Me.lblHeading.Caption = "New Activities Report"
End If
Thanks