hiding textboxes based on content

  • Thread starter Thread starter Janet
  • Start date Start date
J

Janet

I have a form that I'm using to create quotes. On this
form I give the user the ability to add items to the quote
that are not in the product list. I call these fields
misc1, misc2 etc... The misc item name can be added to a
field and the price in another field (miscprice1,
miscprice2 etc.) I have given this ability to the form
for 6 misc items and 6 misc prices.
I then created a report and have included these 6 misc
and 6 misc price fields. The price field shows 0.00 if no
data is entered, and the misc field is empty if not data
is entered.
My question is...
I'd like these fields to display on my report only if
data was entered into them. Is there a way to hide or
show textboxes on a report depending on whether or not the
fields are empty or have a 0.00 value or have data entered
into them?
Thanks,
Janet
 
Janet

Have you looked into the Can Grow/Shrink properties?

Good luck

Jeff Boyce
<Access MVP>
 
No I've looked at this:
Me.[MyTextbox].Visible = Nz(Forms![MyForm]!
[MyCheckBox].Value, "$0.00")
This works like a charm on the price textbox but I don't
know what to replace the "$0.00" for a text box that is
completely empty...I've tried isEmpty & isNull but got
errors. Does anyone know what to use for my string if
it's empty in this case as above?
 
Janet

One idea ...

Me.[MyTextbox].Visible = (Nz(..., "") = "")

And my original idea still holds. If you want to simply turn on/off, use
..Visible property. If you want to shrink up the spacing, use Can Grow/Can
Shrink.

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top