Using DCount with two tables and criteria

prgwhiting

Registered User.
Local time
Today, 14:57
Joined
Apr 18, 2000
Messages
15
I want to check for duplicates using Dcount. I've got a table which holds names, and one which holds addresses. What I basically need to do is join somehow the statement below. As a match has to be found in first the name table and then the address. Then if it returns 1 or more I know that there is already an occurence of this combination. I could do it if the info was in the same table but it's the seperate tables that are confusing me.

Thanks in advance.
Dcount("[LASTNAME]","TBLAPPLICANTS","[LASTNAME]=[FORMS]![FRMAPPLICANTS]![SEARCHLASTNAME]") AND ("[POSTCODE1]","TBLAPPLICANTS","[POSTCODE1]=[FORMS]![FRMAPPLICANTS]![SEARCHLASTNAME]")
 
Can't you use a query to join the tables and search the query?
 
I forgot to mention that I've made a policy to only create my Queries in SQL, for security and neatness. This is a database that I've designed for a company that already has a database which I'm trying to Repair. This has around 100 normal queries, which due to the complexity and the poorness of the programming no-one can be sure of the consequences of deleting any of the old queries. I can write the SQL but am not sure how to then DCount the result without using a normal Query. Sorry if this sounds a bit complicated, but I've become alergic to Queries.
Thanks
 

Users who are viewing this thread

Back
Top Bottom