I have created a module that uses multiple arrays to check transaction dates for the same order number and keep getting a System Resources Exceeded Error. I am using MS ACCESS 2010. I then have to stop the code and do a compact and repair which isn't a big issue except when I do this the code (which normally runs in about 3 minutes) takes hours to complete about 130,000 records. When this happens the database becomes useless and I have to try again with a backup. I think it has something to do with the memory possibly getting filled with the arrays but don't know how to fix. Here are the example of the array variables:
Dim DtEffDate(90) As Date
Dim DtEndDate(90) As Date
All I am doing is comparing DtEffDate(1) with DtEndDate(2) to check for gaps between the records.
Once I have completed the comparison for one order number I set the variables to this:
DtEffDate(RowID) = Empty
DtEndDate(RowID) = Empty
Does anybody have an idea of what I might be doing wrong?
Thanks
Dim DtEffDate(90) As Date
Dim DtEndDate(90) As Date
All I am doing is comparing DtEffDate(1) with DtEndDate(2) to check for gaps between the records.
Once I have completed the comparison for one order number I set the variables to this:
DtEffDate(RowID) = Empty
DtEndDate(RowID) = Empty
Does anybody have an idea of what I might be doing wrong?
Thanks