Do not show value on a report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that we use as our price quote for submitting to potential
customers. There is a control on the report where the client's name is.
Most project are quoted to just one company, however occasionally, we send
the quote to multiple potential clients. For these cases, I have created a
customer named "Multiple" in the customer list. We don't want to leave a
null value in the field because we analyze how many quotes (among other
statistics) we send to each customer, and also need to know how many projects
we bid to "Multiple" clients.

Here is my question: We'd like the CustomerName field to appear blank when
the customer "Multiple" has been selected. Is there an expression that would
achieve this result?

Thanks in advance for any help with this!
 
First, make sure you have different names on the Control (what's used to
display a value) and the Field (which is in the Report's Record Source, and
contains the value). For example, if the Field is "CustomerName", and you
have it in a Text Box, you might call the Text Box "txtCustomerName". In
which case, in the Format or Print event of the Report Section where the
Control is displayed, you could put code:

If Me!txtCustomerName = "Multiple" Then
Me!txtCustomerName.Visible = False
Else
Me!txtCustomerName.Visible = True
End If

If there is a Label Control associated with but not attached to the
txtCustomerName, you will need to have a separate line in each of the
conditions, setting its Visible property to True or False, just as the
txtCustomerName is set.

Larry Linson
Microsoft Access MVP
 
Back
Top