Hello All,
I was fixing some code the other day and received an error, which I managed to fix, which I still don’t understand why the change in question caused the error.
Version Access 2003.
The table tblFees was located in the Front End DB and I moved it to the Back End DB and fixed the associated linking. When I ran the code to generate the Email Billings for our Annual HOA dues this code bombed. Note: it’s been working for 5 years.
'***** Check to see if Rates for that year are present in tblFees ***** Set rst = dbName.OpenRecordset("tblFees") rst.Index = "PrimaryKey" rst.Seek "=", dtBillDt If rst.NoMatch Then
The rst.Index line generated a 3251 error.
Changing it to this made it work again.
'***** Check to see if Rates for that year are present in tblFees ***** Set rst = dbName.OpenRecordset("tblFees", dbOpenDynaset) rst.FindFirst "BillingDate = #" & Format(dtBillDt, "mm-dd-yy") & "#" If rst.NoMatch Then
I’d really like to know why this change was necessary, the stuff I found googling helped me get it fixed but didn’t help at all in understanding the problem. :cheers: