Displaying certain text if a value is between matches certain crit

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

Guest

Hi

How do I display certain text as a result of a query for example

Field 1
<110% TEXT 1
110-120% TEXT 2
120-130% TEXT 3
130% TEXT 4

So that I can show the TEXT items in a report in a report
 
Put the following expression in the first empty field in your query:
MyText:Switch([Field1]<110%,Text1,([Field1]>=110% And
[Field1]<120%,Text2,.......)

Note: In your example, 120% overlaps so Access will not know whether to
display Text2 or Text3. Notice I made the second range <120% to remove the
overlap.
 
Thanks for the help!

PC Datasheet said:
Put the following expression in the first empty field in your query:
MyText:Switch([Field1]<110%,Text1,([Field1]>=110% And
[Field1]<120%,Text2,.......)

Note: In your example, 120% overlaps so Access will not know whether to
display Text2 or Text3. Notice I made the second range <120% to remove the
overlap.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


DaveC271 said:
Hi

How do I display certain text as a result of a query for example

Field 1
<110% TEXT 1
110-120% TEXT 2
120-130% TEXT 3

So that I can show the TEXT items in a report in a report
 
Back
Top