Can someone help me? I have 2 tables of surveys entered 2 times for
data entry accuracy testing. I need to compare the data in each
field and write the answers and field names that were entered
incorrectly to a new table. There are over 3,000 rows (surveys) and
250 columns(questions) in each table.

I am using multidimensional arrays declared as variants and am able
to pull the survey number and the value entered incorrectly from
each survey but I am having trouble pulling the question number of
each data entry error which is the table column name. I cannot use
the index since many questions have an a,b,c etc... part. Below is
partial code that I use to write values to a new table.

Vardata1 = rst1.GetRows(5000)
Vardata2 = rst2.GetRows(5000)

varResult1 = Nz(Vardata1(J, i), "") 'Test for null
varResult2 = Nz(Vardata2(J, i), "")

If varResult1 <> varResult2 Then 'Compare answers

Set dbs = CurrentDb()
Set rstnew = dbs.OpenRecordset("tblCNA", dbOpenDynaset)

With rstnew
.AddNew
![Survey#] = Vardata1(0, i) 'Survey #
![Survey1#] = Vardata2(0, i) 'Survey #

![Question#] = i ????? 'Should pull Question number not
![Question1#] = i ????? index

![table1] = varResult1 'Data entered incorrectly
![table2] = varResult_2 'Data entered incorrectly
.Update
End With

Thanks!


Reply via email to