I previously was checking some data, based on 2 fields (since no one single field can be an unique ID in this data to itself) to check for duplicates.
However, I just recently realized that I actually need to check for at least 5 fields, b/c it is possible (not very common, but does occur) that there are some instances where this does occur.
So, I'm coming here, b/c I REALLY do not want to build a procedure with 5 stinking DLookup statements embedded within each other, and I'm not particularly sure of an alternative SQL statement I might could use.
For the sake of argument, if nothing else, can anyone take any shots at a way to do what I'm talking about? I'll just create some fake data, and put below, and then maybe some of the rest of you folks will have some ideas:
A little more info on the real world usage. I'm importing data into one table, running some various processes on the data, and then importing it into a "historical" table in order to verify that the data set I get the next instance does not duplicate this data (in other words, I've already had MUCH duplicates given in the past, and I need to filter them out each time). Makes sense, I'm sure!
[tt]
----------------------------------------------------
-----------------SAMPLE DATA------------------------
----------------------------------------------------
Tables
-------------
Table1 Name = [blue]tblData[/blue] - The processed data table.
Table2 Name = [blue]tblHist[/blue] - Historical table for comparing "the next time", and the next..
----------------------------------------------------
Fields (identical to both tables)
-------------
- I have a couple additional fields in the history table, but I can figure out my dealings with those on my own. One is an autonumber field.
Field Name - Format
---------------------
[blue]Date[/blue] - Date
[blue]File No[/blue] - Text
[blue]LastName[/blue] - Text
[blue]MI[/blue] - Text
[blue]Firstname[/blue] - Text
----------------------------------------------------
----------------------------------------------------
[/tt]
And if it's something simple, that's even better. I'd pull my hair out if I had any! [SMILE]
I am kind of hoping that I'm just forgetting something very simple, and that one of you will prove it.
Or else, I may be back to the drawing board with 3 embedded "If Dlookup" statements - SCAAAARY!
I don't care if whether it's using an Access Query, a SQL statement, or some other VBA usage. I'm kind of thinking that I'd be better off doing a SQL statment with that much comparing, but hopefully someone can direct me either way.
Thanks in advance for anything,
kjv
--
"If to err is human, then I must be some kind of human!" -Me
However, I just recently realized that I actually need to check for at least 5 fields, b/c it is possible (not very common, but does occur) that there are some instances where this does occur.
So, I'm coming here, b/c I REALLY do not want to build a procedure with 5 stinking DLookup statements embedded within each other, and I'm not particularly sure of an alternative SQL statement I might could use.
For the sake of argument, if nothing else, can anyone take any shots at a way to do what I'm talking about? I'll just create some fake data, and put below, and then maybe some of the rest of you folks will have some ideas:
A little more info on the real world usage. I'm importing data into one table, running some various processes on the data, and then importing it into a "historical" table in order to verify that the data set I get the next instance does not duplicate this data (in other words, I've already had MUCH duplicates given in the past, and I need to filter them out each time). Makes sense, I'm sure!
[tt]
----------------------------------------------------
-----------------SAMPLE DATA------------------------
----------------------------------------------------
Tables
-------------
Table1 Name = [blue]tblData[/blue] - The processed data table.
Table2 Name = [blue]tblHist[/blue] - Historical table for comparing "the next time", and the next..
----------------------------------------------------
Fields (identical to both tables)
-------------
- I have a couple additional fields in the history table, but I can figure out my dealings with those on my own. One is an autonumber field.
Field Name - Format
---------------------
[blue]Date[/blue] - Date
[blue]File No[/blue] - Text
[blue]LastName[/blue] - Text
[blue]MI[/blue] - Text
[blue]Firstname[/blue] - Text
----------------------------------------------------
----------------------------------------------------
[/tt]
And if it's something simple, that's even better. I'd pull my hair out if I had any! [SMILE]
I am kind of hoping that I'm just forgetting something very simple, and that one of you will prove it.
Or else, I may be back to the drawing board with 3 embedded "If Dlookup" statements - SCAAAARY!
I don't care if whether it's using an Access Query, a SQL statement, or some other VBA usage. I'm kind of thinking that I'd be better off doing a SQL statment with that much comparing, but hopefully someone can direct me either way.
Thanks in advance for anything,
kjv
--
"If to err is human, then I must be some kind of human!" -Me