very novice question!!!!

JustMaybe

Registered User.
Local time
Today, 23:09
Joined
Oct 18, 2002
Messages
134
Okay, have the following very novice question!!!... have a label attached to a text box on my report….I’m trying to work out the code..so that if the textbox is null, then the label will be invisible!!!
I’ve used the following code:

Me.RenewalDate.Visible=Not IsNull(Me.RenewalDate)

The problem is I’m not sure what the me. Stands for…I know you use this on forms..but in reports??

My code asks for the macro ‘me’. I’ve done ‘dummy tests’ using the name of the report, the name of the control source, the form it comes from…but all of these ‘attempts’ just ask for a macro in whichever name I replace it with…

Do I need a macro??? Can anyone help?!!??
 
You can do it with an IIf statement.

In the label type (if I've understood your fields correctly):

=IIf(IsNull([RenewalDate]), "","text you want to appear in label")

Your other question: You will use "Me" only in Class Modules, (the code module behind a form or report) and it refers to the related active form / report. Therefore you won't be able to use it in Modules as they don't refer to specific objects.
 
thank you soooo much...problem solved

Your a star

Sarah :D
 

Users who are viewing this thread

Back
Top Bottom