July 12, 2006 at 9:38 am
Can you use a case statement in Access 2003?
July 12, 2006 at 10:22 am
Where do you want to use it?
It's not available in Access SQL (AFAIK), but it is available in VBA. Or if you use a passthru query to a SQL Server db, it's also OK.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 13, 2006 at 2:28 am
For Access SQL use either the IIF( <condition>, <true expression>, <false expression> ), which can be nested (that is the condition or the true/false expresssions can also be IIF's), or use the Choose( <number>, <expression when 1>, <expression when 2>, ..., <expression when n> ) function to return an expression from the value of the number.
If using VBA try the Select Case ... End Case statement.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply