Wrox Programmer Forums Help with a formula
 | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
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
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
Friend of Wrox
 Points: 9,611, Level: 42
 Activity: 0%

Join Date: Mar 2004
Location: Washington, DC, USA.
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
 Authorized User Join Date: Oct 2005 Location: South Ockendon, Essex, United Kingdom. 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.

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are Off Forum Rules

 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

All times are GMT -4. The time now is 06:51 PM.