Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ACCESS 2003 sql statement in query

Posted on 2014-01-23
1
Medium Priority
?
475 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

782 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