I've done a little more digging - the same table is used at an earlier point in the code - I get 2 cursors from it, a search and an update. Those work fine. Then a form is displayed, and when a button is clicked, the same table is loaded again, and then when I get the cursor it crashes. If I skip the first step and just go to the part where it crashes, it will work fine.
I've tried setting pTable = nothing, pCursor = nothing - still can't get it to work.