automatically change the text in a text box?

  • Thread starter AceBuildingInspector
  • Start date
A

AceBuildingInspector

I have a report where a text box sentence needs to change from singular to
plural. One example is: "[applicant] is permitted....." Applicant may be a
company, a person or several people, usually a couple, so the finished
product should either read "ABC Contracting is permitted" or "John & Jane Doe
are permitted". I think the "& symbol" could be used as a key for an Iif
statement, but I'm unsure of how to go from there.
 
D

Dorian

The only reliable way I can think of is to have a 'UsePlural' column in your
table.
The data would have to be entered by a user since there is no way to
automatically determine if an entity requires plural; you could have a single
entity with '&' in its name.
I would try to come up with a design where you do not need to do this.
Simpler is almost always better.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
M

Marshall Barton

AceBuildingInspector said:
I have a report where a text box sentence needs to change from singular to
plural. One example is: "[applicant] is permitted....." Applicant may be a
company, a person or several people, usually a couple, so the finished
product should either read "ABC Contracting is permitted" or "John & Jane Doe
are permitted". I think the "& symbol" could be used as a key for an Iif
statement, but I'm unsure of how to go from there.


Though you never said how you can figure out when to use the
singular or plural, I will assume that you have a Yes/No
field that is True for singular and False for plural.

=[applicant] & IIf([singular], " is", " are" & "
permitted....."
 

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