jonmitch,
If companyID is unique, then yes, as you put it, the companyID is messing it up.
For reference, read the following excerpt I took from Access97 help about DISTINCT.
"If the SELECT clause contains more than one field, the combination of values from all fields must be unique for a given record to be included in the results."
So if companyID is unique, each and every record is unique.
i.e. where first column is companyID
1 My Company lake st tampa
2 Your Company ocean st miami
3 My Company lake st tampa
The first and the third records look like duplicates on company name and you would like "My Company" to appear only once. But since companyID is in the select, each of the three above records is unique and will appear.
However,in the dummy db I am trying this out on, I deleted my CompanyID from the query and it worked ok. Are you sure there is not something else that is making the records unique. Company name the same, but address different?
Here is my dummby db.
tblONE
id(autonum)CoName(text) Address(txt) City(txt) State(txt)
1 My Company 123 fine la
2 My Company 234 same ak
3 Smart co
4 Dumb co
5 Dumb co
6 Dumb co
7 Smart co
8
9
In query design sql I have:
SELECT DISTINCT tblOne.CoName, tblOne.Address, tblOne.City, tblOne.State
FROM tblOne
WHERE (((tblOne.CoName) Is Not Null));
which gives the following results:
CoName Address City State
Dumb co
My Company
My Company 123 fine la
Smart co
Smart co 234 same ak
I did not put it in company order so that you can see which records are affected.
Note My Company is there twice because combination CoName/address/city/state are different between the two records.
Smart co is there twice for same reason.
Dumb co is there only once because the combination CoName/address/city/state are exactly the same in the records for id 4, 5, and 6.
Note recored id 8 and 9 are not there because CoName is null.
I would analyze the data a little more closely. Deleting CompanyID should not make the ReferralCompanyName go away. If you are using query designer, make sure all the "show" checkboxes are checked. Easy to accidentally uncheck one.
Good luck, let me know how it goes.
JDemmer