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

CR7, Eliminate duplicate data due to multiple dates

Status
Not open for further replies.

spiced

Technical User
Aug 21, 2001
26
US
I need to eliminate duplicate data due to multiple dates when I run a report for actions that took place between 1/1/06 and 12/31/06. I am using an Access based database with multiple tables of which I am using 3 of the tables: 1) Equipment, 2) Event, and 3) History. Fields used in the report are from 1) Component ID, Manufacturer, Model, Serial Number, Description, & Location. 2) Interval, Number, & Due Date. 3) Date, & Due Date. Several Component IDs have multiple histories which causes all of the other associated data to repeat. What I want to do is use the last Date that was entered into the history to pull the rest of the data so that I only have one entry for Component ID but since there are 2 or more history dates it pulls the data for each history date. I am a novice at programming and could use some help. The current formula from the formula editor is as follows.
{Equipment.System ID} <> "CHEM" and
{Equipment.Status} in ["Active"] and
{History.Date} in Date (2006, 01, 01) to Date (2006, 12, 31) and
{Equipment.Component ID} like "??????"

Thanks in advance
spiced
 
Try going to report->selection formula->GROUP and entering:

{History.Date} = maximum({History.Date}, {Equipment.Component ID})

...assuming you have inserted a group on component ID. Not sure what you mean by the last line of your record selection formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top