Access 2007 and Cancel Key - Strange behavior

J

J

Hi,
I have a database in Access 2003 format and it's going to be used in Access
2007 and there are a couple of weird things happening with the escape key.

One of them is this: I have form #1 that has a list of products. If you
double click on a product, it opens form #2 and gives the product details.
If you double click on one of the fields in Form #2 it opens Form #3 with
more information. (Form #2 is still open as it's supposed to be). Form #3
has a command button that closes the form and the cancel property of this
button has been set to yes so a user can hit the esc key and the form
closes. The problem is, instead of closing it when esc is pressed, it puts
the form (form #3) behind form #2. If I click on the field again in Form
#2, the field goes blank. The data is still there but not visible. If I
bring form #3 to the front, the esc key works fine. The esc key also works
OK if I click anywhere in Form #3 before I hit esc.

This works perfectly in Access 2003 with absolutely no problems but not in
Access 2007.

I thought may this was a focusing issue so I should also mention that when
form #3 loads, the focus is set to a field control.

Thanks in advance for help.
J
 
J

Jeanette Cunningham

I haven't tested this but, it looks like it would work.
When user double clicks a control and opens form#3, make form#2 hidden.
When closing form#3, make form#2 visible.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

J

Thanks for your answer but it doesn't work. I also thought it would work
because that is how form#1 and form#2 work. Form#1 becomes invisible until
Form#2 is closed, then is visible again.

Normally, when a form is opened the active control is highlighted. In this
case, when form#3 is opened from form#2, no controls are highlighted. If I
run a sub to tell me what is the current form and current control, the
message is correct. When I close the immediate pane, the correct control is
then highlighted. If I open the form all by itself, the esc key works fine.

This is only one of three problems I'm having with the escape key issue.
All slightly different but all with hitting esc.

Thanks again.
 
J

Jeanette Cunningham

Ok, make a dummy form (just a blank form with a cancel or close button) and
use instead of form#3.
Does it behave as expected?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

J

Jeanette,
Sorry for the delay in answering, I was out of town yesterday.

I made a dummy form as you suggested with a close button. ( a blank form
with no RecordSource). It behaves the same. The form (NewForm3) is sent
to the back.

Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top