Error 2465 generated by DoCmd.RunCommand acCmdDeleteRecord. The error text is "...can't find the field '|' referred to in your expression."

The code in question is:
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

Previously code was using DoMenuItem and the same error was generated.

If I do the same operation using the menu, it works without error.

This problem arose after conversion to Access 2002. It worked fine in Access 97.

I have no idea what the "|" refers to.

Thanks...