Backspace Key on Form (1 Viewer)

DJNickWatt

Registered User.
Local time
Today, 05:39
Joined
Feb 29, 2008
Messages
25
This is an annoying little problem and I was wondering if anyone could lend any insight as to how to solve it. I am using Access 2007.

Create a blank form and go to form view. Press the backspace key. The computer will beep and you probably won't even notice but the status bar will quickly flash a message saying:

"Records can't be deleted with this form"

Well obviously. To stop the warning you can set the form's Key Preview to true and then capture the KeyCode in the KeyPress of the form, set it to zero and problem solved. But not quite.....

I am using an ActiveX control on the form. If I am editing a cell in the ActiveX control and press the backspace key the above problem happens because the key pressed is getting passed on down the chain to the form. If I use the work around I mentioned in the previous paragraph I cannot then delete a character from a cell in the ActiveX control because I have stopped the backspace character being passed to it.

Basically I'm stumped. I have tried all manner of things to solve this *beeping* problem but to no avail. I have even contact the support people for the ActiveX control and they are even stumped and asked me to inform them if I come up with an answer.

I tried putting the form onto a form in Access 2003 and it works fine without the beeps. So I definitely think it has something to do with Access 2007. Is there a way to disable the default behaviour of the backspace key on a form?

Can anyone please help?

Cheers

Nick
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:39
Joined
Sep 12, 2006
Messages
13,892
this might work --- use the form error event

in there put

{might need to be accesserror rather than err}
call msgbox("error: " & err * " Desc: " & err.description)
response = acdataerrcontinue

this will show you the error number causing this behaviour

THEN you can single out this error

if err<>targeterror THEN
call msgbox("error: " & err * " Desc: " & err.description)
end if
response = acdataerrcontinue
 

DJNickWatt

Registered User.
Local time
Today, 05:39
Joined
Feb 29, 2008
Messages
25
this might work --- use the form error event

in there put

{might need to be accesserror rather than err}
call msgbox("error: " & err * " Desc: " & err.description)
response = acdataerrcontinue

this will show you the error number causing this behaviour

THEN you can single out this error

if err<>targeterror THEN
call msgbox("error: " & err * " Desc: " & err.description)
end if
response = acdataerrcontinue

I had tried using Form_Error but it doesn't even trigger that event!
 

RJAhuja

New member
Local time
Today, 00:39
Joined
Mar 13, 2008
Messages
1
I too just started to experience a problem with the backspace key in an Active X grid within Access 2007, and I have narrowed the problem down to the form being bound.

If the form is bound when I press backspace within the cell of a certain Active X grid, nothing happens. Access doesn't even see the keypress. All other keys seem to be fine (all that I've tested anyways).

Is this an Access 2007 bug? Please help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom