report criterium (1 Viewer)

G

ghiafreek1

Guest
I'm very new to the db scene. I used the report wizard to create a phone directory. I have some listings which will include an extra field. There are only a handful of requiring this field. How can make it so that the text field only shows up when a record has a value for that field. (other_phone is new field)
(ie. Other Phone 210-731-8995) or blank if not present

thanks for any help,
ghiafreek1
 

Chris RR

Registered User.
Local time
Today, 02:45
Joined
Mar 2, 2000
Messages
354
I'm assuming that you want a detail section something like this:

Name: John Doe
Phone: (123) 456-7890
Other Phone: (123)987-6543

Create a text box. Set Can Grow and Can Shrink to "yes". Then create a control source for it, something like this:

=IIf(IsNull([Other_Phone])," ","Other Phone: " & [Other_Phone])

This way, both the title "Other Phone" and the value in Other_Phone are visible only when needed.

If this text box is on a line by itself, you'll want to set Can Grow and Can Shrink to "yes" for the Detail section, too. That way Access takes care of line spacing for you.
 
R

Rich

Guest
Or just set the CanShrink to yes, the field won't display if it's empty
 
G

ghiafreek

Guest
Thanks very much both of you.
These little things mean a lot.
I do still have another question. If a record doesn't have values for those two fields of even one, there is still line spacing. I want the next record to come right under the previous.

ghiafreek
 
Last edited:

Users who are viewing this thread

Top Bottom