Access 97...
I am working on a variance checker for an invoice generation application. I have a table, tblCharges, with about 35 fields. What I need to be able to do is check approx 30 of these fields against themselves, one month difference...For example:
February field 1 compared against January field 1
February field 2 compared against January field 2
and so on
This will take place for about 350 records each month.
I decided to create a recordset of the table, and walk through it using a loop for each of the fields....fine, works great. Now I need to clone the recordset to find the previous month as such:
strDate = DateSerial(DatePart("yyyy", .Fields(0)), DatePart("m", .Fields(0)) - 1, 1)
strCriteria = "[Month] = " & strDate & " And [BaseNo] = " & .Fields(4) & """"
rsLast.FindFirst strCriteria
where field(0) houses the date and field(4) houses the base number.
Everytime I try to run this I get:
Error 3251 - Operation not supported for this type of object.
Whats wrong???? Any suggestions as to a better way to do this????
The secret to creativity is knowing how to hide your sources. - Albert Einstein![[spin] [spin] [spin]](/data/assets/smilies/spin.gif)
Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
I am working on a variance checker for an invoice generation application. I have a table, tblCharges, with about 35 fields. What I need to be able to do is check approx 30 of these fields against themselves, one month difference...For example:
February field 1 compared against January field 1
February field 2 compared against January field 2
and so on
This will take place for about 350 records each month.
I decided to create a recordset of the table, and walk through it using a loop for each of the fields....fine, works great. Now I need to clone the recordset to find the previous month as such:
strDate = DateSerial(DatePart("yyyy", .Fields(0)), DatePart("m", .Fields(0)) - 1, 1)
strCriteria = "[Month] = " & strDate & " And [BaseNo] = " & .Fields(4) & """"
rsLast.FindFirst strCriteria
where field(0) houses the date and field(4) houses the base number.
Everytime I try to run this I get:
Error 3251 - Operation not supported for this type of object.
Whats wrong???? Any suggestions as to a better way to do this????
The secret to creativity is knowing how to hide your sources. - Albert Einstein
![[spin] [spin] [spin]](/data/assets/smilies/spin.gif)
Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com