Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using IIf in a Select to sum more than one field 1

Status
Not open for further replies.

tbonehwd

IS-IT--Management
Jul 28, 2005
45
US
Here is another question I have about the use of IIf say for example I want

I want to Select ITEM_NO,ITEM_DESC, and sum the QTY_SHIPPED as UNITS_SHIPPED and Sum the DOLLARS_SHIPPED as TOTAL_DOLLARS based on the below IIf statement.

Select (IIf(ORD_NUM<'90000000')),ITEM_NO,ITEM_DESC, SUM QTY_SHIPPED as UNITS_SHIPPED, SUM DOLLARS_SHIPPED as TOTAL_DOLLARS

I am really trying to understand the syntax of the IIf within a select.

Thanks,

Tbonehwd
 
Your syntax doesn't make much sense. Your IIf expression is only:
IIf(ORD_NUM<'90000000')
This expression is missing both the True and False parts.

Why don't you tell us what you have and what you want? Maybe some sample records would help explain your needs.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookom,

I would first like to thank you for your advice regarding the use of "Select Case" that works so much better than all the If Else statements. I do apologize if I come off a little clueless I am pretty new to this whole programming in Access.

I am going to do some more research before I make another post regarding my problem.

Thanks again for all your help...

Tbonehwd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top