More control over text/list/combo boxes

JoshuaAnthony

Registered User.
Local time
Today, 14:58
Joined
Dec 18, 2003
Messages
68
Hi,

I am using a text box on my form and I was wondering if anybody knows how I can cause the 'Enter' key to start a new line in the textbox instead of moving to the next field?

Also, I use list boxes for most of my fields so that the user can't make mistakes in their selections. Unfortunately, I lose the "indexing" ability that I have with a combo box. For example, given the following set of data:

...
4555555
4566662
4578888
4599999
...

I would like to be able to start to type the number (459...), as for a combo box to go straight to my selection but I don't want to allow the user to make a selection that doesn't exist (like they can for a combo box). Any suggestions to get around this? The only thing I can think of is checking whether the number exists when the focus leaves this control. Does anybody know any other ways? I thought maybe there was some option somewhere that I could select to make my combo box act the way that I want it to.

Thanks,

Joshua
 
Hi,

If you change how the Enter key is interpreted in Access objects then this will affect all of your fields and not just the textbox.

If you use a combo box you can restrict the data by putting code on the OnNotinList Event of the combo, so that it will only select the data in the combo. You can put code into the event to show a msgbox or whatever you want to do when the user enters data that is not in the combo's underlying datasource.

You can also set the limit to list property on the combo's properties.

Hope this Helps

Andy
 
Combo box stuff worked but trying to test the enter key thing and can't find that Enter Key Behaviour option anywhere. The closest I can find is under Tools>Options>Keyboard>Moves After Enter but that just means that nothing happens when I press enter. Is it possible to make it so that enter is a carriage return? Could you be more specific about where to find it please? I have Microsoft Access 2002.
 
JA,

For a textbox you should find it in the Property Sheet, tab Other,
set Enter Key Behaviour to "New Line in Field".

Wayne
 

Users who are viewing this thread

Back
Top Bottom