Solved

ACCESS 2003 sql statement in query

Posted on 2014-01-23
1
451 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now