Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need Query Syntax Help

Posted on 2011-02-16
3
Medium Priority
?
336 Views
Last Modified: 2013-11-05
I have a query with a field named "TotJobHours".  This field is a calculation field made up by...
TotJobHours: [TotSomeHours]+[TotSomeMoreHours]+[TotEvenMoreHours]

But I need another query with a field that is something like...
RemainingJobHours: [TotSomeHours] where SomeHoursComplete = False +[TotSomeMoreHours] where SomeMoreHoursComplete = False + [TotEvenMoreHours] where EvenMoreHoursComplete = False
but this syntax is not correct.  Can someone provide guidance here?

--Steve
0
Comment
Question by:SteveL13
[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
  • 2
3 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34909712
(all on one line)

RemainingJobHours:
IF(SomeHoursComplete, 0, [TotSomeHours])
+IF(SomeMoreHoursComplete, 0, [TotSomeMoreHours])
+IF(EvenMoreHoursComplete, 0, [TotEvenMoreHours])
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 2000 total points
ID: 34909716
I meant this: (all on one line)

RemainingJobHours:
IIF(SomeHoursComplete, 0, [TotSomeHours])
+IIF(SomeMoreHoursComplete, 0, [TotSomeMoreHours])
+IIF(EvenMoreHoursComplete, 0, [TotEvenMoreHours])
0
 

Author Closing Comment

by:SteveL13
ID: 34910231
Thank you!
0

Featured Post

Independent Software Vendors: 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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increasedā€¦

618 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