carterlw12
Registered User.
- Local time
- Today, 05:22
- Joined
- Oct 2, 2018
- Messages
- 25
I am operating in the SQL View of the Query builder.
I have a list box on a form that is pulling values based off my query. The problem is I have several duplicate values. For instance, when I import files using a form, I have a column in the table update with the file name for every record that was in that particular file. So there could be like 100 records that all have FileName = rcokrons_20180719@1603 but each line has its OWN DatabaseID (primary key)...
I've tried two types of SQL statements.
I have a list box on a form that is pulling values based off my query. The problem is I have several duplicate values. For instance, when I import files using a form, I have a column in the table update with the file name for every record that was in that particular file. So there could be like 100 records that all have FileName = rcokrons_20180719@1603 but each line has its OWN DatabaseID (primary key)...
I've tried two types of SQL statements.
Code:
SELECT DISTINCT TOP 5 ADP_Person_Import_tbl.DatabaseID, ADP_Person_Import_tbl.FileName
FROM ADP_Person_Import_tbl
ORDER BY ADP_Person_Import_tbl.FileName DESC;
'This gives me every instance of "rcokrons_20180719@1603" instead of just giving me 1 instance.
Code:
SELECT DISTINCT TOP 5 ADP_Person_Import_tbl.FileName
FROM ADP_Person_Import_tbl
ORDER BY ADP_Person_Import_tbl.FileName DESC;
'When I hit RUN to test, this gives me the first instance of each FileName, which is what I want, but
when I go to Form View, nothing shows in the list box anymore....