Hi all,
I am really not understanding this VBA stuff very well, and I can't seem to find the answers I'm looking for so far, so thought I would post this plea for help.
Basically I have 3 tables. Let's call them Original, Temp, and Result. There is a field in each table called Entry, and there can be duplicates of Entry in both Original and Temp.
I begin by selecting a subset of Original, writing those into the Temp and adding a random number at the same time. I then sort Temp by the random number. This is where I am stumped.
I now want to select a subset of Temp and write those into Result, but I do not want any duplicates of Entry in the Result table.
I suspect that I need to have some kind of loop to write the records into the Result table, and within that loop, have a dlookup or similar function checking for duplicates before either passing or appending the record, but I have no idea how to write that code.
Any assistance would be most appreciated.
Thank you,
Stu
I am really not understanding this VBA stuff very well, and I can't seem to find the answers I'm looking for so far, so thought I would post this plea for help.
Basically I have 3 tables. Let's call them Original, Temp, and Result. There is a field in each table called Entry, and there can be duplicates of Entry in both Original and Temp.
I begin by selecting a subset of Original, writing those into the Temp and adding a random number at the same time. I then sort Temp by the random number. This is where I am stumped.
I now want to select a subset of Temp and write those into Result, but I do not want any duplicates of Entry in the Result table.
I suspect that I need to have some kind of loop to write the records into the Result table, and within that loop, have a dlookup or similar function checking for duplicates before either passing or appending the record, but I have no idea how to write that code.
Any assistance would be most appreciated.
Thank you,
Stu