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

Selecting distinct records based only on a couple of fields

Status
Not open for further replies.

KidFix

Programmer
Feb 7, 2002
60
US
Ello all

I'm having trouble selecting distinct records. The problem is that two records that are distinct by some fields are not actually distinct by the fields I'm displaying in my details section.

Here's a better explanaition:

say my database had fields 'Name' and 'Number' and had two records in it:

Mark, 123
Mark, 456

in the details section of my report I have the Name field and I want the report to select distinct only on Name so that when printed only one record is displayed, the problem is in the page header section is the Number field so the report distinguishes these records and repeats the details section twice. Not what I want

as a work around, I was going to make a forumla field that while printing the report builds an array of Name fields which it uses to see if that name has already been displayed if so it hides that particular section. This should work, but could be quite slow with many records, so I was wondering if there is a better/quicker/easier method I could employ.

Sorry for the long winded explanation. Any help would be much appreciated!

Many thanks
Kid
 
Group by name? Then hide details and display from the first record, which is what you get when you show detail values in the group header. Madawc Williams
East Anglia
Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top