Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ACCESS 2003 sql statement in query

Posted on 2014-01-23
1
Medium Priority
?
470 Views
Last Modified: 2014-01-23
I have an
Complete Hour Status: IIf([CompleteProcessHr]<13,"Completed By 1 pm",IIf([CompleteProcessHr]<14,"Completed By 2 pm",IIf([CompleteProcessHr]<15,"Completed By 3 pm",IIf([CompleteProcessTime]<#4:31:00 PM#,"Completed By 4 pm","Completed AFTER 4  pm"))))
 ACCESS 2003 query where I need a stmt to  group by the hour except for one of the IIF which groups by hour and minute.   See my stmt below.  it results in #ERROR.  

Help.  I know the issue is with IIf([CompleteProcessTime]<#4:31:00 PM#,"Completed By 4 pm" as if I remove this portion of the stmt the query works.

HELP  Thank You
0
Comment
Question by:eyes59
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
eyes59 earned 0 total points
ID: 39805480
I have an
 ACCESS 2003 query where I need a stmt to  group by the hour except for one of the IIF which groups by hour and minute.   See my stmt below.  it results in #ERROR.  

Complete Hour Status: IIf([CompleteProcessHr]<13,"Completed By 1 pm",IIf([CompleteProcessHr]<14,"Completed By 2 pm",IIf([CompleteProcessHr]<15,"Completed By 3 pm",IIf([CompleteProcessTime]<#4:31:00 PM#,"Completed By 4 pm","Completed AFTER 4  pm"))))


Help.  I know the issue is with IIf([CompleteProcessTime]<#4:31:00 PM#,"Completed By 4 pm" as if I remove this portion of the stmt the query works.

HELP  Thank You
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question