Help Ticket Counter No Longer Works

I have a Help Desk database in Notes and it has worked fine for years. Recently the ticket number field stopped working and I have to blame it on the upgrade to Notes R7 from R6 because that is about the time it broke. Here is the code I’m using:

@If(@IsNewDoc & @IsDocBeingSaved; “”; @Return(Ticket));

(@Subset(@DbColumn(“” : “NoCache” ; “” : “” ; “Document Counter” ; 1) ; 1)) + 1

The result I get after saving a new doc is simply ‘@ERROR’, which leaves me no clue as to the cause of the problem. At first I thought maybe I had too many records because this used to be a limitation of the @DBColumn in Notes R5. So I deleted a bunch of old records but the problem still exists. I also no the code is correct because if I make a blank copy of the database the formula works correctly. Any ideas?

Subject: Help Ticket Counter No Longer Works

Sounds like you may have reached the 64k limit for @dbcolumn.

Subject: Help Ticket Counter No Longer Works

check your previous document, the number where your adding one from and see if that number got corrupted somehow