Wrox Programmer Forums Help with a formula
 |
 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

October 19th, 2005, 11:54 AM
 Corey Friend of Wrox Join Date: Sep 2005 Posts: 106 Thanks: 0 Thanked 0 Times in 0 Posts
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

October 20th, 2005, 06:30 AM
 mmcdonal Friend of Wrox Join Date: Mar 2004 Posts: 3,069 Thanks: 0 Thanked 10 Times in 10 Posts

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

October 20th, 2005, 10:48 AM
 Figgis Authorized User Join Date: Oct 2005 Posts: 41 Thanks: 0 Thanked 0 Times in 0 Posts

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