Field promotion in a Report.

J

Joergen Bondesen

Hi NG.

I have a Table - Quiery an a Report.
The Reports contain fields:

First_Lastname
Adr1
Adr2
ZipCity

If this was mailmerge in Word and Adr2 field was empty I would have this
information in the letter:

First_Lastname
Adr1
ZipCity

Is it possible to do so in the Report?
 
F

fredg

Hi NG.

I have a Table - Quiery an a Report.
The Reports contain fields:

First_Lastname
Adr1
Adr2
ZipCity

If this was mailmerge in Word and Adr2 field was empty I would have this
information in the letter:

First_Lastname
Adr1
ZipCity

Is it possible to do so in the Report?

You could set the [Adr2] control's CanShink property to Yes.
If no other control is on the same line, the ZipCity will move up.
or...
What do you wish to do if Adr2 is not empty?
Show both addresses?
Use an Unbound text control instead of the 2 bound text controls.
Set it's control source to:
=IIf(IsNull([Adr2]),[Adr1],[Adr1] & chr(13) & Chr(10) & [Adr2])

or...
Show Adr2 only if Adr1 is empty?
= IIf(IsNull([Adr1]),[Adr2],[Adr1])
 
J

Joergen Bondesen

Hi Fred

Thanks.

The magic word I was looking for was: CanShink

--
Best Regards from
Joergen Bondesen


fredg said:
Hi NG.

I have a Table - Quiery an a Report.
The Reports contain fields:

First_Lastname
Adr1
Adr2
ZipCity

If this was mailmerge in Word and Adr2 field was empty I would have this
information in the letter:

First_Lastname
Adr1
ZipCity

Is it possible to do so in the Report?

You could set the [Adr2] control's CanShink property to Yes.
If no other control is on the same line, the ZipCity will move up.
or...
What do you wish to do if Adr2 is not empty?
Show both addresses?
Use an Unbound text control instead of the 2 bound text controls.
Set it's control source to:
=IIf(IsNull([Adr2]),[Adr1],[Adr1] & chr(13) & Chr(10) & [Adr2])

or...
Show Adr2 only if Adr1 is empty?
= IIf(IsNull([Adr1]),[Adr2],[Adr1])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top