define variables

A

atse

Hi,
I want to make a dynamic comparison in order to find out all the duplicates
in the table. Becuse the data is not so tidy, and sometime the strings have
a little difference but still a duplicate, I don't compare with this field.
In this case, I have to select those fields that don't have so much
confusion.

In short, I have a table containing field1, field2 ... fieldn :' "n" is a
variable
I want to make a comparison to next record by the fields selected, NOT all.

For example:

if fileld1 is selected then
Ffield1 = rs("fileld")
end if

if fileld2 is selected then
Ffield2 = rs("fileld2")
end if
....
if fileldn is selected then
Ffieldn = rs("fileldn")
end if

'when the recordset move next

if fileld1 is selected then
Sfield1 = rs("fileld1")
end if

if fileld2 is selected then
Sfield2 = rs("fileld2")
end if
....
if fileldn is selected then
Sfieldn = rs("fileldn")
end if

' now do comparison

if Ffield1 = Sfield1 and Ffield2 = Sfield2 and ... Ffieldn = Sfieldn then
' also get rid of those unseleted fields in above statement.
'if field4 is not selected, then no Sfield4 defined, and no value.

'do whatever I want here.

This may not be a good solution, but I don't have a better one. Can anyone
provide me a share idea? Or let me know how to figure out the problem above.
Thanks a lot.

Atse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top