Formatting query results

  • Thread starter Thread starter Joe Holzhauer
  • Start date Start date
J

Joe Holzhauer

I have a query that I'm using as the rowsource for a listbox. I have
several items that are rated level 1, 2, 3, or 4. There are also some that
are for all levels.

The level is stored as a Number (Byte), with 0 representing All Levels.

I'd like the level column to be displayed:
.... Level 1 ...
.... Level 3 ...
.... Level 2 ...
.... Level 2 ...
.... All Levels ...
.... Level 2 ...
etc.

I can use the expression "Level " & tblItems.Level
but that doesn't convert "Level 0" to "All Levels"

Is there a way?

Any help would be appreciated! Thanks,
Joe
 
I can use the expression "Level " & tblItems.Level
but that doesn't convert "Level 0" to "All Levels"

Is there a way?

Iif([Level] = 0, "All Levels", "Level " & [Level])

John W. Vinson[MVP]
 
Back
Top