Hello Guys,
Do you know how to create a code in which I can concatenate fields and also check for duplication? I am using 2 tables one that contains the data and the other one contains the list of fields that needs to be concatenated.
Hello Guys,
Do you know how to create a code in which I can concatenate fields and also check for duplication? I am using 2 tables one that contains the data and the other one contains the list of fields that needs to be concatenated.
An example of WHAT you are trying to accomplish, showing inputs and expected outputs, would help clarify your post.
Hello Orange, what im trying to do is for example i have table 1 and table 2. In table 1 i have the list of fields in one column that will be used for concatenation. In table 2, i have those fields in a row but contains also fields that i dont want to be concatenated. Then if the concatenation is sucessful how can i check for duplicates?
Show us some data, input and desired output.
Hello Orange,
I have posted a sample data above, Table 1 consist of fields and key fields while table 2 consist of the data. For the Output it is somewhat a copy of Table 2 but has Key Field and Duplicate extra fields. For the Key Field it will concatenate the fields that was marked X in Table 1 and for the Duplicate it will check the Key Field if it has a Duplicate. Thank you very much.
OK I see your data. Now my question is WHAT is the purpose of KeyField?
With Access, there is a query wizard that will help you construct a query to find Duplicates.
You do not need KeyField to find duplicates in your records. In your example, FirstName and lastName
will show duplicates when coparing records on that combination of fields.
If you are trying to make a unique identifier for each record, then use an autonumber.
The purpose of the Key Field is that it could cater different types of data. Since Table 2 will be used in different set of data for example the fields there might consist of 20 but I only need to check if it has a duplicate using only 13 fields.
Also, Table 1 will always consist of FIELDS and Key Field. The FIELDS column will be the same numbers as to the Table 2 and Key Field column will be different depending on what set of key fields I want to concatenate and check for duplication.
I don't understand what you are trying to do.
With Access, there is a query wizard that will help you construct a query to find Duplicates.
You can adjust to find duplicates in any combination of fields.
And apparently neither do the other 90+ members that have read your post but not replied. Not trying to be critical, but have been doing this for over 20 years and simply have no idea what your end result is supposed to be.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
Apology If you don't understand what I'm trying to do here. I am trying to create a 1 button program in which once the user inputted the Table 1 and Table 2 with their desired data, the result would then be the Output.xls. This is because our data is not only limited to 10 or 20 fields but also up to a hundreds and thousands. So for example, I have a table 2 that contains 200 fields but I only need to check the concatenated duplicates of 100 fields I am not going to risk that a colleague of mine might concatenate it all wrong. That is why there is a Table 1 in which I can input all the fields and pick the ones that needs to be concatenated in Table 2.
If possible can you just give me a code to concatenate. That is the only thing Im missing just the command.