Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Control not working properly in Access.

Status
Not open for further replies.

ToddR

Programmer
Feb 28, 2001
35
US
I created an ActiveX Control in VB6 that has a FlexGrid as a constituent control. I capture the KeyPress event in the grid and if it's Tab or Enter, I move to the next cell in the grid. This works perfectly if the compiled control is placed on a VB form or added to an HTML page as an object. However, when I place it on an Access 2000 form, the Tab and Enter keys are ignored - almost as if Access won't let these keys be passed to the control. Has anyone experienced this before? Know any workarounds?
P.S. I've not tried this on any other versions of Access, so I can't say whether it's a 2000 specific problem yet. Again, it works outside of Access just fine.
Thanks!
 
The only thing I can think of is to check the Form the control rests on. There is a property of the form that is called, "KeyPreview". You could try flipping that Yes/No value and try it.

Perhaps, you could try declaring the control in the code module with the "With Events" declaration clause. Then, verify those events by placing a message box in a custom event procedure to indicate if the events are actually firing.

I wish I had the solution for you, but my suggestions were more investigative. I hope it helps.

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top