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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting details between groups

Status
Not open for further replies.

sandora

Technical User
May 17, 2005
57
US
V11,AccessDB This is an example of what my report looks like now.

GH1-Salesperson1-Mikey
GH2-TrailerType-LQ
Detail-Deal# Gross Commissions

GH1-Salesperson1-Howard
GH2-TrailerType-LQ
Detail-Deal# Gross Commissions

I have this report built and it works great, but now they've discovered that sometimes the Salespeople share deals and they need to be split between them. Each salesperson has a unique sales#. If only one person has the deal, the number is located in field SP1 of table2, if there is a second person, theirs is in field SP2 of table2. I've used this formula:

if isnull({sp2}) or {sp2} = "" or {sp1} = {sp2} then
{retial} else
({retail}/2)

and it returns all of retail values and splits the deal on SP1 but it doesn't show up in the detail on SP2 (the other half of the deal).

I added a second Emply# table alias. It is linked the same way as the other table. Still not showing up on the second person. Here are the tables and their links:

DB1: Emply Table, Emply Table1
DB2: Inventory table
DB3: Intro table, Profit table

Links:
Profit;Deal# to Intro;Deal#
Intro;Stock# to Inventory;Stock#
Intro;SP1 to Emply;Emp#
Inrto;SP2 to Emply1;Emp#
Emply;Co# to Inventory;Co#
Emply1;Co# to Inventory;Co#

I think part of the problem is with the @salesperson formula:

{Emplytable.Lastname}&", "&{Emplytable.Firstname}

I think I need for it to look at the alias emply1 table also but not sure how?

Please help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top