Form closes after <return> instead of going to next field

J

John S. Ford, MD

I'm using Access 97 and have a form with a bound table set up so that if the
user opens it, it automatically defaults to display a new record. The focus
goes immediately to the first control which is a TextBox with an
accompanying input mask.

The problem is that when the user enters the data in that first field, after
he hits <return>, instead of moving to the next field, the form simply
closes. I have the "Move After Enter" option set to "Next Field" on my
Access 97 options.

Otherwise, the form works fine. This behavior does NOT occur when editing
old records. the cursor simply moves to the next field.

Any idea why this is happening?

John
 
A

Albert D. Kallal

In addition to Arvins ideas, you might want to check any button you have on
the form.

If you set the "default" property of a command button on the form to "yes",
then hitting the enter key will fire (press) that button as if you had
clicked on it. (this is a great feature for prompt and dialog boxes where
the user can type something in, and then either hit enter, or click on a
"ok" button that you make).

So, check any button on the form if the "default" property setting is yes
 
J

John S. Ford, MD

Albert,

When I was trying to isolate the problem, ultimately, it came down to your
observation. As it turned out, the actual focus in certain situations would
be on the "Exit" button. For reasons that aren't clear to me. I could be
typing in a subform thinking that IT had the focus. When I hit <return>
however, the "Exit" button was being hit.

So I guess it's possible for the actual focus on a form to be in one place
but for it to appear that the focus was on the subform. To solve the
problem, I explicitly put the focus on the subform and from there the
TextBox of interest. Success!

Thanks to everyone who thought about this problem!

John
 
F

Fabiano Eyer Silva

Oi Albert tudo bem com você?
Como vão as coisas ai sou novo do crupo de noticias isso ai colega seja
bem vindo al crupo



Um Abraço Fabiano 23/8/04 segunda feira
 

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