?
Solved

Need Query Syntax Help

Posted on 2011-02-16
3
Medium Priority
?
329 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

762 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