Color scheme: Light
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library troubleshooting » Copy and paste fail after many Access sessions

Copy and paste fail after many Access sessions

Copy and paste stop working in every program of the Windows session, also outside Access; Access reports error 0x80070008 (“not enough memory”) for automation or DDE calls and behaves erratically.

Environment

Windows 10 and 11 with Microsoft 365 Access, on PCs where Access is started and closed very often in one Windows session, for example by a scheduled job or automated tests. Not specific to the WKL controls.

Cause

Windows keeps a global atom table of 16 384 entries per session; an entry is freed only when its owner deletes it or the user signs out. Two kinds of entries pile up with Access:

  • Every Access that ends with Quit leaves an entry MSAccess<process id>; an Access ended in the task manager leaves none.
  • Accessibility requests to an Access datasheet (a table, a query, a subform in datasheet view) leave an entry MSAA:... when the program that asked never picks up the answer. Such entries come from Access's own datasheet window, also in a database without any WKL control; the windows of the WKL controls answer such requests without leaving entries.

When the table is full, the clipboard (OLE copy and paste, also between other programs), DDE and some automation calls fail.

Resolution

  1. Sign out of Windows and in again, or restart: only this empties the table.
  2. For jobs that automate Access: end Access with Quit and wait for the process to end, and do not start a new Access for every small step.
  3. For tools that read Access through UI Automation: find the windows of your own Access process by their handle instead of searching the whole desktop, and do not ask a busy or hung window.
en/wiki/msaccess/comctl/troubleshooting/clipboard-fails-after-many-access-sessions.txt · Last modified: by Wolfgang van der Stille