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!

Drop down filter Select Distinct not working

Status
Not open for further replies.

JKDeveloper0718

Programmer
Aug 11, 2006
23
US
I have a dropdown in a form that then populates textboxes within that form. My problem is the information is comming from a table called tblVerfifyInfo which has the following fields VerifyFamilyInfoId(autonumber), VFICompany, VFIAddress1, VFIAddress2, VFICity, VFIState, VFIZip

With this in mind the dropdown choice is made and uses the verifyinfoID number which is an autonumber to filter the info to then populate the textboxes with the name and address information using VBA. The main question I have is that the users are allowed to enter new verify contact information into the tblVerfifyInfo table and there is alot of duplication and a SELECT DISTINCT would remove duplicates or records that are the same within each field easily BUT there is that autonumber that makes them different and that VerifyFamilyInfoId(autonumber) is the unique element that populates the textboxes. Any suggestions on reducing duplicates because I cant stop the users from adding new verification info.

This is the record source for the drop down and as you can see tblVerifyFamilyInfo.VerifyFamilyInfoId is the bound column and the first record in the distinct command which doesnt allow the statement to filter the redundancy.

SELECT DISTINCT tblVerifyFamilyInfo.VerifyFamilyInfoId, Trim([tblVerifyFamilyInfo]![VFICompany]) & " at " & Trim([tblVerifyFamilyInfo]![VFIAddress1]) & " " & Trim([tblVerifyFamilyInfo]![VFIAddress2]) & " " & Trim([tblVerifyFamilyInfo]![VFICity]) & " " & Trim([tblVerifyFamilyInfo]![VFIState]) & " " & Trim([tblVerifyFamilyInfo]![VFIZip]) AS contact, tblVerifyFamilyInfo.VFICompany FROM tblVerifyFamilyInfo GROUP BY

 
You may try running a make-table query with a select distinct statement in it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top