Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 19th, 2005, 11:54 AM
Friend of Wrox
 
Join Date: Sep 2005
Location: , , USA.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default Help with a formula

I’m trying to run a formula that will look for a name in on field and go to a different field and divide the 1: the qty 2: Retail 3: Cost

In a nutshell

If in field ([Buyer Name])=Person’s name, /qty
If in field ([Buyer Name])=Person’s name, /Retail
If in field ([Buyer Name])=Person’s name, /Cost

Below is the formula currently being used without the formula to divide the fields?

Field (1)Divide: Qty: Sum(IIf([OL_PRICE]*([OL_QTY_ORD]-[OL_QTY_CAN_TD])=0,0,([OL_QTY_ORD]-[OL_QTY_CAN_TD])))

Field (2)Divide: Retail: Sum(([OL_PRICE]*([OL_QTY_ORD]-[OL_QTY_CAN_TD])))

Field (3)Divide: Cost: Sum([OL_DMD_COST]*([OL_QTY_ORD]-[OL_QTY_CAN_TD]))

Thank you very much for your help, I’ve been working on these fixes for a number of months


  #2 (permalink)  
Old October 20th, 2005, 06:30 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I don't understand what you want. It looks like you are trying to divide a text field by a number field. This will cause errors.

Can you explain more?



mmcdonal
  #3 (permalink)  
Old October 20th, 2005, 10:48 AM
Authorized User
 
Join Date: Oct 2005
Location: South Ockendon, Essex, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Figgis
Default

Corey, I thought we'd answered this on your previous posting (Nested IIf Statements). Perhaps you need to explain fully what you are trying to do. Are you using a form or are you trying to do this directly onto a table? If you need to chat 1 to 1 then use my MSN. It is difficult to help without understanding what you are trying to do fully.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with formula Juan0214 Access 4 August 1st, 2008 07:25 AM
Help with formula 2 Juan0214 Access 3 July 10th, 2008 06:52 PM
Formula scandalous Access VBA 11 February 27th, 2007 09:49 AM
formula sinha Crystal Reports 1 October 26th, 2005 12:53 PM
Formula Ned Pro VB 6 2 September 10th, 2003 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.