Enter Key Behaviour in Textbox

  • Thread starter Leonard Priestley
  • Start date

L

Leonard Priestley

I have set the Enter Key property to 'New Line in Field' in a textbox
control called 'Description' (bound to a memo field).

If I complete an entry in a box above the 'Description' one, and press
Enter, the cursor moves to the 'Description' box, and then skips down one
line within the box.

That is, pressing the Enter key to get to this box is also putting an
unwanted 'Enter' into the box. If I set the Enter Key property to
'Default', I have no problem, but I'd like to know how to get the 'New Line
in Field' property to work properly.

Thanks

Leonard Priestley
 
Ad

Advertisements

K

Ken Snell

The behavior that you describe isn't what I'd expect.

(1) Is there already an empty line in the Description textbox before you get
to it?

(2) By any chance are you hitting the Enter key twice?

(3) Is there any code running on the Description textbox (OnEnter,
OnGotFocus events)?
 
L

Leonard Priestley

Ken,
Thank you for your prompt reply.

The answers to your questions:

(1) No, there is no empty line pre-existing. There is no default value,
either in the underlying table, or in the textbox Default property. I have
experimented with placing the mouse cursor in the Description box and
pressing the Backspace key, and the Delete key, to get rid of any existing
space, and it makes no difference to the problem.

(2) No, I have tried being very careful, and I am sure I'm not entering two
keystrokes.

(3) No, there is definitely no code attached to the control.

In my original message, I said that I was using a memo field. I now realize
that that is not the case. The textbox is bound to a 200 character text
field. The textbox has the vertical scroll enabled, but I have also tried
it without the scroll bar.
I have recently copied all the relevant contents of the original database to
a new one, as a clean-up process, and I have compiled and saved all modules,
so I doubt if there is any rubbish to give me problems. The references I am
using are:
Visual Basic for Applications
MS Access 8.0 Object Library
MS DAO 3.51 Object Library

By the way, I forgot to say that I am using Access 97

Leonard Priestley
 
Ad

Advertisements

K

Ken Snell

Weird...

If you would like, zip up a sample of the database and email to me (remove
this is not real from my address). I'll take a look as soon as I have a few
minutes.
 

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