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

Hep with Query

Status
Not open for further replies.

am4ndeep

Technical User
Nov 9, 2006
23
GB
Hi Guys

Hope you can help.

I will gve you an example of what I am doing. I attended an appointment on 01/12/2008. The report picks out the company which I had appointment with and if any ales havebeen made so will look like ths.

(Userid) - (Company) - (Contact) - (Sale Date)

The sale date shows if their was a sale made against that contact. What I need I to do is if their is no sale against ths specific contact, scan through the database and look at any sales made for another contct with the same company name and insert the date in here.

Hope this makes sense

 
But what if there are multiple dates for other contacts? What date would you want to see?

-LB
 
Hi LB

If therr are multiple dates with other contacts then I would want the most recent date to display. Is it an array I would need to use?

Thanks for the help.
 
Insert a group on company, and then replace the sale date field with this formula:

if isnull({table.saledate}) then
maximum({table.saledate},{table.company}) else
{table.saledate}

-LB
 
Hi LB

Thanks for th feedback. This only seems to work if their is an appointment for the otherrecord.

E.g. Apponitment completed for Person1. If sale is completed for Person 2 no date is shown. however if their is an appointent for Person 2 as well then the date is shown for person 2.
 
Because the report only picks up records where thir has been an appoinment attended. So what I need it to do is to scan records where ther isn't an appoinment with the same company name and pick out the date.
 
Please show some sample data across multiple records, and then for the same sample, show how you would like it to display.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top