Solved

Need Query Syntax Help

Posted on 2011-02-16
3
305 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
  • 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 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
deduplicating based on criteria 2 21
Switch 5 18
Access summarise unique values in tables 2 16
Progress bar in access form 11 25
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…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

831 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