If field contents are empty, don't display 
Author Message
 If field contents are empty, don't display

Hi All,

I have a field called PHOTOGRAPHER in an FMP database.  Sometimes there is not
a Photographer listed for a particular photograph, so that when I'm printing
labels for the photographs, that has text that says PHOTO BY, I don't want the
label to say:

Photo by: [empty, blank space]

How and where would I make a calculation so that if that field doesn't contain
any information, don't print the words PHOTO BY?

Actually, I've got the same problem in the DATE field, if it's empty, I don't
want to have the words DATE appear in the label.

Thanks All,
Earl



Wed, 11 Sep 2002 03:00:00 GMT
 If field contents are empty, don't display


Quote:
> Hi All,

> I have a field called PHOTOGRAPHER in an FMP database.  Sometimes there is
not
> a Photographer listed for a particular photograph, so that when I'm
printing
> labels for the photographs, that has text that says PHOTO BY, I don't want
the
> label to say:

> Photo by: [empty, blank space]

> How and where would I make a calculation so that if that field doesn't
contain
> any information, don't print the words PHOTO BY?

> Actually, I've got the same problem in the DATE field, if it's empty, I
don't
> want to have the words DATE appear in the label.

> Thanks All,
> Earl

Earl,

There are a couple of ways to do this.

Make the label (in your case the words "Photo By" and "Date")  calculated
fields or part of calculated fields and not text.

For instance, you could use a calculated field (LabeledPhotographerCalc, set
to Text) something like:

If(IsEmpty(Photographer),"","Photo By: " & Photographer)

Use the LabeledPhotographerCalc field (instead of the Photographer field) on
your labels or reports.  You can figure out other possible variations of
this..

The IsEmpty function is quite handy for just the situation you are dealing
with on reports and labels.

Jim



Wed, 11 Sep 2002 03:00:00 GMT
 If field contents are empty, don't display

Quote:

> Hi All,

> I have a field called PHOTOGRAPHER in an FMP database.  Sometimes there is not
> a Photographer listed for a particular photograph, so that when I'm printing
> labels for the photographs, that has text that says PHOTO BY, I don't want the
> label to say:

> Photo by: [empty, blank space]

> How and where would I make a calculation so that if that field doesn't contain
> any information, don't print the words PHOTO BY?

> Actually, I've got the same problem in the DATE field, if it's empty, I don't
> want to have the words DATE appear in the label.

If(isEmpty(Photographer),"","Photo by: " & Photographer)

Use this field on your layout. It prints the whole thing including the
photographer's name if there is one, or nothing if not. If this comes in
the middle of other stuff, you can make it slide left (and up if
appropriate) so that if there is no photographer, no blank space is left
either.
--
Mire Black



Thu, 12 Sep 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Access 2000 memo type fields don't display on my ASP pages

2. Help, I am a programmer and don't understand SQL/NT admin

3. Don't laugh - I am serious - Paradox 3.5/4

4. Joins with empty Tables don't work?

5. Don't display blank records...

6. Datareports don't display in distributed application without error

7. Displaying Memo field contents in a Grid?, How to

8. Don't display the results?

9. Sometimes they display...sometimes they don't

10. Don't display the deleted-marked records in a VIEW

11. Q don't display search indicator

12. textbox controlsource off and on in code - some tb don't display


 
Powered by phpBB® Forum Software