ActiveX and Ctrl-V/C (1 Viewer)

RunRobert

New member
Local time
Tomorrow, 01:55
Joined
Sep 4, 2012
Messages
2
I have an ActiveX control that I wrote using the Access Interop tools and VB.NET. With it I am doing complicated searches, which I am hosting in a Form. I then have events that trigger that take the user to the Access Forms required.

The problem I am having is that when I put the ActiveX control into the form, Access doesn't allow the following keystrokes to be passed through to the ActiveX:

Ctrl-V
Ctrl-C
Del

It is a mystery why the Delete key doesn't go through, but Backspace does.

I am running this in Access 2003.

I have seen a few people with a similar problem, but no solution.

Does anyone have a solution to this?
 

RunRobert

New member
Local time
Tomorrow, 01:55
Joined
Sep 4, 2012
Messages
2
Here is my theory why these keystrokes are not passed to the ActiveX control:

Access allows you to delete records by clicking the Delete key. So each form has a trap for the Delete Key being pressed. It then works out what to do with that, and will delete the record if it can.

Due to the fact that there is no datasource on the form, Access traps the Delete key press, and does nothing with it. So it never gets sent to the ActiveX control.

The same applies for Ctrl-V and Ctrl-C. You might want to copy a line in the database, so Access needs to trap these events to work out what to do with the data. And again, because my form has no datasource, the events get ignored.

So the solution would be to trap the events before Access gets them, and pass them to the ActiveX control.

I have not been able to work out how to do that.

Is my logic here correct? And if so, anyone know of a way to do this?
 

Users who are viewing this thread

Top Bottom