Conditional Printing of Certain Fields in A Report

K

Kevin T

i need to have a conditional printing of some fields (SEE BELOW)

VENDOR SHARE $999.99
LESS TAX $999.99
country ENGLAND
tax (%) 20%
AMT DUE $999.99

how do I print only these 5 lines when the tax amount is not zero.

Also how do i combine line 2,3 & 4 and looks like

LESS ENGLAND (20%) TAX

instead.

I tried doing the following:

="LESS" & [COUNTRY] &"(" &[TAX (%)] &")"

in the control source but i got a #ERROR error

Any help would be appreciated.
 
M

Marshall Barton

Kevin T said:
i need to have a conditional printing of some fields (SEE BELOW)

VENDOR SHARE $999.99
LESS TAX $999.99
country ENGLAND
tax (%) 20%
AMT DUE $999.99

how do I print only these 5 lines when the tax amount is not zero.

Also how do i combine line 2,3 & 4 and looks like

LESS ENGLAND (20%) TAX

instead.

I tried doing the following:

="LESS" & [COUNTRY] &"(" &[TAX (%)] &")"

in the control source but i got a #ERROR error


That expression looks like it should work as long as the
text box is not named [COUNTRY] or [TAX (%)]

You probably want to add a space at the end of LESS and
before the next (
 
K

Kevin T

Thanks. How about the 1st part of the question? My first attempt at
programming in Access after many years.
 
M

Marshall Barton

I thought it was all one question.

You can make individual controls invisible using this kind
of logic:

Me.anycontrol.Visible = Nz(Me.[TAX (%)], 0) > 0

You may want to explore using the CanShrink property too.
--
Marsh
MVP [MS Access]


Kevin said:
Thanks. How about the 1st part of the question? My first attempt at
programming in Access after many years.

Kevin T said:
i need to have a conditional printing of some fields (SEE BELOW)

VENDOR SHARE $999.99
LESS TAX $999.99
country ENGLAND
tax (%) 20%
AMT DUE $999.99

how do I print only these 5 lines when the tax amount is not zero.

Also how do i combine line 2,3 & 4 and looks like

LESS ENGLAND (20%) TAX

instead.

I tried doing the following:

="LESS" & [COUNTRY] &"(" &[TAX (%)] &")"

in the control source but i got a #ERROR error

Any help would be appreciated.
 
K

Kevin T

I am sorry. I have no idea where to put that logical line. Can you elaborate?
Thanks

Marshall Barton said:
I thought it was all one question.

You can make individual controls invisible using this kind
of logic:

Me.anycontrol.Visible = Nz(Me.[TAX (%)], 0) > 0

You may want to explore using the CanShrink property too.
--
Marsh
MVP [MS Access]


Kevin said:
Thanks. How about the 1st part of the question? My first attempt at
programming in Access after many years.

Kevin T said:
i need to have a conditional printing of some fields (SEE BELOW)

VENDOR SHARE $999.99
LESS TAX $999.99
country ENGLAND
tax (%) 20%
AMT DUE $999.99

how do I print only these 5 lines when the tax amount is not zero.

Also how do i combine line 2,3 & 4 and looks like

LESS ENGLAND (20%) TAX

instead.

I tried doing the following:

="LESS" & [COUNTRY] &"(" &[TAX (%)] &")"

in the control source but i got a #ERROR error

Any help would be appreciated.
 
M

Marshall Barton

That kind of thing needs to be in the Format event procedure
of the section that contains the control you are hiding.
--
Marsh
MVP [MS Access]


Kevin said:
I am sorry. I have no idea where to put that logical line. Can you elaborate?
Thanks

Marshall Barton said:
I thought it was all one question.

You can make individual controls invisible using this kind
of logic:

Me.anycontrol.Visible = Nz(Me.[TAX (%)], 0) > 0

You may want to explore using the CanShrink property too.


Kevin said:
Thanks. How about the 1st part of the question? My first attempt at
programming in Access after many years.

:

i need to have a conditional printing of some fields (SEE BELOW)

VENDOR SHARE $999.99
LESS TAX $999.99
country ENGLAND
tax (%) 20%
AMT DUE $999.99

how do I print only these 5 lines when the tax amount is not zero.

Also how do i combine line 2,3 & 4 and looks like

LESS ENGLAND (20%) TAX

instead.

I tried doing the following:

="LESS" & [COUNTRY] &"(" &[TAX (%)] &")"

in the control source but i got a #ERROR error

Any help would be appreciated.
 

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