Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9261459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:09:05+00:00 2026-06-18T13:09:05+00:00

I am using vb.net and Access 2010 as the database (.accdb) This works with

  • 0

I am using vb.net and Access 2010 as the database (.accdb)

This works with MySQL:

SELECT user_id, username, first_name, middle_name, last_name,
CASE is_enable WHEN 1 THEN 'Yes' ELSE 'No' END 
FROM tbl_user_accounts ORDER BY user_id

But when passed the same query to Access, I get the following error:

Unrecognized keyword WHEN.

So I assume that the CASE Statement is different in access, or does access has that function at all?

P.S.
is_enable is boolean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T13:09:06+00:00Added an answer on June 18, 2026 at 1:09 pm

    Figured it out:
    Access 2010 does not have the CASE function, we use SWITCH instead.

    SELECT user_id, username, first_name, middle_name, last_name, SWITCH(is_enable=True,'Yes',is_enable=False,'No')
    FROM tbl_user_accounts ORDER BY user_id

    Thanks to chuff and JW.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using vb.net running a backend MS.Access database and I am wondering what
Am using grids in VB.net to display database records stored in Microsoft Access, the
I'm using Web Developer 2010, ASP.NET with the VB.NET programming language and a MS-Access
I am using DBLinq to access a MySQL DB from C# .NET 3.5 I
I am using Linq2Sql in VS 2010 (C# .Net 4.0) to handle my database
I am using .Net Remoting and trying to access a remote object modified in
I have created a Data Access Layer using .NET. Everywhere that I update a
Using VB.NET with ASP.NET and and ms-access 2003 data, I'm trying to input data
I am looking for an OSS data access block for using with .Net and
When using a DenseMatrix from Math .NET, and I want to access the second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.