Case Statement

  • Thread starter Thread starter LilP
  • Start date Start date
L

LilP

In my table the users are entering numbers in a field ( 1 - 5) which
represent ratings such as "Poor" and "Good". I want the information to
display as text...

If 1 then "Poor" - I think on the table I can write the expression in the
Default Value property - Is that right? Also what is the actual code to get
it to work?
 
You could build a bunch of nested IIF statements but better is a translation
table.
Ratings ---
Rate - number - integer ( 1 - 5 )
Rating - text ( Poor through Good based on the number in Rate field.

In your query left join the data table rating field to the translation table
Rate field. Put Rating field in the field row of the grid.
 
You can create a query from the table, with an expression such as

IIF([RATING] =
1,"POOR",IIF([RATING]=2,"BAD",IIF([RATING]=3,"AVERAGE",IIF([RATING]=4,"GOOD",IIF([RATING]=5,"EXCELLENT","UNKNOWN
RATING")))))

Hope it helps

Jon
 
Create a combobox. Select ValueList as the RowSourceType and enter your
value list in the RowSource property
1;"Poor";2;"step2";3;"step3";4;"step4";5;"Good"

Set the
ColumnCount to 2
ColumnWidths to 0";2"

No code required :)
 

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

Similar Threads


Back
Top