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 189765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:12:00+00:00 2026-05-11T16:12:00+00:00

Can you use case expressions in Access? I’m trying to determine the max date

  • 0

Can you use case expressions in Access? I’m trying to determine the max date form 2 columns but keep getting syntax errors in the following code:

CASE 
  WHEN dbo_tbl_property.LASTSERVICEDATE > Contour_dates.[Last CP12 Date]
    THEN dbo_tbl_property.LASTSERVICEDATE 
  ELSE Contour_dates.[Last CP12 Date] 
END AS MaxDate
  • 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-05-11T16:12:00+00:00Added an answer on May 11, 2026 at 4:12 pm

    You can use the IIF() function instead.

    IIF(condition, valueiftrue, valueiffalse)
    
    • condition is the value that you want to test.

    • valueiftrue is the value that is returned if condition evaluates to TRUE.

    • valueiffalse is the value that is returned if condition evaluates to FALSE.

    There is also the Switch function which is easier to use and understand when you have multiple conditions to test:

    Switch( expr-1, value-1 [, expr-2, value-2 ] … [, expr-n, value-n ] )
    

    The Switch function argument list consists of pairs of expressions and
    values. The expressions are evaluated from left to right, and the
    value associated with the first expression to evaluate to True is
    returned. If the parts aren’t properly paired, a run-time error
    occurs. For example, if expr-1 is True, Switch returns value-1. If
    expr-1 is False, but expr-2 is True, Switch returns value-2, and so
    on.

    Switch returns a Null value if:

    • None of the expressions is True.

    • The first True expression has a corresponding value that is Null.

    NOTE: Switch evaluates all of the expressions, even though it returns only one of them. For this reason, you should watch for
    undesirable side effects. For example, if the evaluation of any
    expression results in a division by zero error, an error occurs.

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

Sidebar

Related Questions

The use case I can think of is the following: In a typical application,
On a Use Case diagram can you show things that an actor cannot do,
I can't figure out a use case for being able to annotate interfaces in
Which checksum algorithm can you recommend in the following use case? I want to
I've got a use case where those indicators disturb the user interaction. Can I
How can I use output caching with a .ashx handler? In this case I'm
I use VS2008 targetting .NET 2.0 Framework, and, just in case, no I can't
According to man 5 proc , one can use the /proc filesystem to access
You can use more than one css class in an HTML tag in current
You can use a standard dot notation or a method call in Objective-C to

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.