Display records one time only

F

FirstVette52

Primary Key is ID and data is extracted by ClubID. Fields are ID, ClubID,
StpMail, FNm, LNm, MI, AD1, CO, Cty, ST, ZP.

Prompt asks for up to 5 ClubID's, but the resulting Dataset has duplicates
(one ID may have been a member of all ClubID's)

ClubID is a year value (i.e., 2007). How do I restrain the data so I don't
end-up with Duplicate values?

Thanks in advance for any suggestions.
 
F

FirstVette52

Almost Forgot: for each ClubID Criteria entered, 'StpMail' Is Null (to
eliminate invalid addresses).
 
J

John W. Vinson

Primary Key is ID and data is extracted by ClubID. Fields are ID, ClubID,
StpMail, FNm, LNm, MI, AD1, CO, Cty, ST, ZP.

Prompt asks for up to 5 ClubID's, but the resulting Dataset has duplicates
(one ID may have been a member of all ClubID's)

ClubID is a year value (i.e., 2007). How do I restrain the data so I don't
end-up with Duplicate values?

Thanks in advance for any suggestions.

Open the query in design view, and view its Properties. Set the Unique Values
property to Yes.

Note that this answer is 'guessing in the dark' because we know nothing about
the query other than what you post; perhaps you could post the SQL view.
 
K

KARL DEWEY

Try this --
SELECT YourTable.ID, YourTable.ClubID, YourTable.StpMail, YourTable.FNm,
YourTable.LNm, YourTable.MI, YourTable.AD1, YourTable.CO, YourTable.Cty,
YourTable.ST, YourTable.ZP
FROM YourTable
WHERE YourTable.ClubID = (SELECT Max([ClubID]) FROM YourTable AS [XX] WHERE
YourTable.ID = [XX].ID)
ORDER BY YourTable.ID;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top