Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

Returning different fields based on criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stevefromdodge - 21 Jun 2007 19:23 GMT
I'm looking to right a query to return the amount we should be billing our
customers for freight.

I have a table in which each record is a package. Each record contains our
job number, a normal freight amount, a discounted freight amount and a
package weight, along with other stuff. Customers qualify for the discounted
rate if the entire shipment is >= 150 pounds.

I need to come up with a query that returns the sum of the normal freight
amounts if the sum of weights is less than 150 pounds, or it returns the sum
of the discounted rates if the sum of weights is >= 150 pounds. I've got the
grouping and summing working OK, but I'm pretty clueless on how to set up
that condition.

Thanks in advance,
Steve
KARL DEWEY - 21 Jun 2007 19:34 GMT
Freight: IIF([package weight] >= 150, [discounted freight amount], [normal
freight amount])

Signature

KARL DEWEY
Build a little - Test a little

> I'm looking to right a query to return the amount we should be billing our
> customers for freight.
[quoted text clipped - 12 lines]
> Thanks in advance,
> Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.