I linked the labels. Thanks didn't know that. I labels and text boxes
disappear when tax amount is 0. However, the only thing that shows up when
tax amount is not 0 is the Label for Product total?????? with no prodtotal
value and no tax amt. The overall total reflects the tax in there. Tried to
originally set the text boxes as visible and not visible - still get the same
result. Also third line of code below had to put
me.taxamt_text - not sure if right - was sending me to debut and didn't
recognize taxamt - by itself.
Me.Prodtotal.Visible = (Me.[Taxamt_text] <> 0)
Me.FreightRate.Visible = (Me.[Taxamt_text] <> 0)
Me.Taxamt_text.Visible = (Me.[Taxamt_text] <> 0)
Any ideas?????? seems like we're getting close????
Ofer Cohen said:
1.
Ti link the lable to the TextBox follow this steps
1.1 Select a lable and Cut it (Ctrl+X)
1.2 Select the text box you want to link the lable to
1.3 Paste (ctrl + v)
Now the lable should be linked to the text box, do the same to all of the
lables
2.
If the Tax Text field name is taxamt and in it control source it say
=Sum([taxamt])
Change the name of this text field to taxamt_text, and try the code
Me.Prodtotal.Visible = (Me.[taxamt_text] <> 0)
Me.FreightRate.Visible = (Me.[taxamt_text] <> 0)
Me.Taxamt.Visible = (Me.[taxamt_text] <> 0)
I hope that helped
--
Good Luck
BS"D
:
Anyone have any ideas - need help!!! Of course was supposed to be done
yesterday??
:
Put it on the OnPrint of the section.
However, Getting all text boxes not visible even if there IS a taxamt.
Also the labels are still there. these text boxes are sums for
example-maybe that is some of the reason - how do I tie the labels into the
text box.
Name of text box is taxamt
Control source for taxamt is =sum([taxamt])
Code that doesn't seem to work??
Me.Prodtotal.Visible = (Me.[Taxamt] <> 0)
Me.FreightRate.Visible = (Me.[Taxamt] <> 0)
Me.Taxamt.Visible = (Me.[Taxamt] <> 0)
:
The code should be located on the OnPrint event of the section were this
field are placed in.
If the lables are attached to the text box, then this code should hide it
automatically
--
Good Luck
BS"D
:
I added the code below to the OnOpen event of the Report since on the
properties there is no On Print was getting the error below:
You entered an expression that has No Value
Me.[Prodtotal].Visible = (Me.[Taxamt] <> 0)
Me.[FreightRate].Visible = (Me.[Taxamt] <> 0)
Me.[Taxamt].Visible = (Me.[Taxamt] <> 0)
Not sure how this will also handle the labels to not be visible also if the
tax amt. is 0
did I type a syntax error and or what else do I need??
Thanks,
Barb
:
In that case lets try someting else, set all this fields can shrink property
to Yes.
On the OnPrint event of the Report write the code
Me.[freignt].Visible = (Me.[Tax] <> 0)
Me.[Product].Visible = (Me.[Tax] <> 0)
Me.[Tax].Visible = (Me.[Tax] <> 0)
--
Good Luck
BS"D
:
That helps alot but I would ALSO like the Product and freignt labels and text
boxes to be not visible if tax=0. Any way I can do that??????
:
Set the CanShrink property of the TaxField and the Section where the Tax
field is located in to Yes.
Change the control source of the Tax field to
=IIf([Tax]=0,Null,[Tax])
Make sure that the name of the Tax Field is not Tax, the same name as the
field in the table, give it a different name, other wise the IIf will give
you NAME#
--
Good Luck
BS"D
:
On a report I am creating an invoice. listed is the an example
Total Product 220.18
Total Freight 506.15
Tax 0.00
Total Due: 726.33
I would like if the tax amount is 0.00 then ONLY to show the Total Due:
$amount
Is there anyway to make the text boxes and labels for the Product,freight
and tax not be visible if tax amount is 0????????
Thanks,
Barb