Hello everyone,
I have a question. I'm looking to find out whether there is a type of criteria i can put in my query that allows which forbids one record to have the same values as the following record (i.e duplicate).
Any help is appreciated !
Hello everyone,
I have a question. I'm looking to find out whether there is a type of criteria i can put in my query that allows which forbids one record to have the same values as the following record (i.e duplicate).
Any help is appreciated !
use SELECT DISTINCT rather than SELECT if you are not summing, counting or averaging,etc. If you are then change your query to GROUP BY
I agree with Ajax, but I'm wondering if there is more to the question than you posted.
If it is a duplicate value in only a few fields, then DISTINCT will do the job.
A duplicate record in data base means all fields in 2 or more records have same values.
You can establish primary key and/or unique composite index to prevent duplicates which is enforced at the database software level.
I'm not very familiar with VBA much, is there anyway you could lay it out a bit simpler ? thanks !
Did you look at the links? There are step by step instructions re unique composite index.
What VBA was giving you concern???
it is SQL, not vba. To changer a query to SELECT DISTINCT, in the query builder either
1. go to the sql window and edit the code or
2. in the query build widow, open properties and change unique values from no to yes