to display or not to display....

lynsey2

Registered User.
Local time
Today, 14:54
Joined
Jun 18, 2002
Messages
439
in a report i have i have a sort of table, i cant seem to work out how to do this it should be easy but hey you know me!:rolleyes:

What i want to do is check if a field has a value and if it does then in a text box next to the field have the number of days shown else if the field doesnt have a value then dont display/print the number of days! thing is the text box for the number of days has to be a calculated field.

i should be able to do this but cant! im sorry!
If anyone can help that would be great!
Lyns!:(
 
You can use an IIF() statement as the textboxes' controlsource.

Set the texboxes' Controlsource property =IIF(isnull(field)=false, NumberOfDaysCalculation,"")

Help has a good explanation of this....

Since I don't know the calculation for the dates, I'll leave it up to you. If you wish to submit the calcualtion, please do so...
 
Right so if i put

=IIf(IsNull([Strength3])=False,[Forms]![ARTScript]![Stop Date]-[Forms]![ARTScript]![Start Date],"")

into the control source of the text box then that should work!
It did thank you very much!

Lyns X
 

Users who are viewing this thread

Back
Top Bottom