dbTalk Databases Forums  

moving to last name in Listbox issue

comp.databases.ms-access comp.databases.ms-access


Discuss moving to last name in Listbox issue in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bobh
 
Posts: n/a

Default moving to last name in Listbox issue - 04-09-2010 , 03:21 PM






Hi All,

In access xp I have a form that has a listbox, normally I use
combboxes but in this case I have to use a listbox. The listbox list
lastname, firstname,email. Bound column is lastname and the rowsource
is sorted by last name.

in a combobox as I type the last name the highlight moves down the
list to the approperiate entry.

in a listbox this does not happen, when I type the first character
like 'h' the highlight moves to the first last name beginning with
'h'. If I then type the second character of the last name such as 'y'
the highlight moves the the first last name beginning with 'y', not
good..........

why doesn't it work the same as a combobox but more important, how do
I make it work the same as a combobox???
thanks
bobh.

Reply With Quote
  #2  
Old   
(PeteCresswell)
 
Posts: n/a

Default Re: moving to last name in Listbox issue - 04-09-2010 , 04:04 PM






Per bobh:

Quote:
in a combobox as I type the last name the highlight moves down the
list to the approperiate entry.

in a listbox this does not happen, when I type the first character
like 'h' the highlight moves to the first last name beginning with
'h'. If I then type the second character of the last name such as 'y'
the highlight moves the the first last name beginning with 'y', not
good..........

why doesn't it work the same as a combobox but more important, how do
I make it work the same as a combobox???
I can answer the first one: it does not happen bc the guys who
developed the code for it's behavior did not write to that spec.

Greater minds than mine will probably chime in with the solution
to the second one. IIRC, writing functionally-similar code to
make a VB6 combo box work the same as an MS Access combo box
resulted in about three pages of code.
--
PeteCresswell

Reply With Quote
  #3  
Old   
fredg
 
Posts: n/a

Default Re: moving to last name in Listbox issue - 04-09-2010 , 06:16 PM



On Fri, 9 Apr 2010 13:21:59 -0700 (PDT), bobh wrote:

Quote:
Hi All,

In access xp I have a form that has a listbox, normally I use
combboxes but in this case I have to use a listbox. The listbox list
lastname, firstname,email. Bound column is lastname and the rowsource
is sorted by last name.

in a combobox as I type the last name the highlight moves down the
list to the approperiate entry.

in a listbox this does not happen, when I type the first character
like 'h' the highlight moves to the first last name beginning with
'h'. If I then type the second character of the last name such as 'y'
the highlight moves the the first last name beginning with 'y', not
good..........

why doesn't it work the same as a combobox but more important,, how do I make it work the same as a combobox???
thanks
bobh.
Question .. why doesn't it work the same as a combo box ...
Because it wasn't designed to work like a combo box.

Question .. how do I make it work the same as a combo box? ...
Sorry but a List Box is a List Box and a Combo Box is a Combo
Box. The best you can do is to keep repeating the "h" and it will jump
to the next item that begins with the letter "h".

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Reply With Quote
  #4  
Old   
David W. Fenton
 
Posts: n/a

Default Re: moving to last name in Listbox issue - 04-10-2010 , 06:26 PM



bobh <vulcaned (AT) yahoo (DOT) com> wrote in
news:d2f995dc-2e13-4e0a-9ea5-f0c613ea43b7 (AT) n3g2000vbl (DOT) googlegroups.com
:

Quote:
In access xp I have a form that has a listbox, normally I use
combboxes but in this case I have to use a listbox. The listbox
list lastname, firstname,email. Bound column is lastname and the
rowsource is sorted by last name.

in a combobox as I type the last name the highlight moves down the
list to the approperiate entry.

in a listbox this does not happen, when I type the first character
like 'h' the highlight moves to the first last name beginning with
'h'. If I then type the second character of the last name such as
'y' the highlight moves the the first last name beginning with
'y', not good..........

why doesn't it work the same as a combobox but more important, how
do I make it work the same as a combobox???
Two points:

1. if you're looking for lastname "Fenton", type F to go to the
first F, F again for the next, and F again and again until you get
to the match you want. Not as convenient as combo box autocomplete,
but not exactly terrible.

2. a dropped-down combo box looks an awful lot like a listbox. It
can't be multiselect, but what you're asking for wouldn't be useful
for multiselect, anyway. So, consider using a combo box and drop it
down when the user lands in it, and then you can have autocomplete.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Reply With Quote
  #5  
Old   
David W. Fenton
 
Posts: n/a

Default Re: moving to last name in Listbox issue - 04-10-2010 , 06:27 PM



fredg <fgutkind (AT) example (DOT) invalid> wrote in
news:175rj52u2dvz.33tedgqo8ao1.dlg (AT) 40tude (DOT) net:

Quote:
Question .. why doesn't it work the same as a combo box ...
Because it wasn't designed to work like a combo box.

Question .. how do I make it work the same as a combo box? ...
Sorry but a List Box is a List Box and a Combo Box is a Combo
Box. The best you can do is to keep repeating the "h" and it will
jump to the next item that begins with the letter "h".
I agree with your answers, except for your "the best you can do..."
Surely you could combine the listbox with a textbox and filter the
listbox in the textbox's OnChange event. That's not the same as
AutoComplete, but it would make a large listbox easier to use.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Reply With Quote
  #6  
Old   
Br@dley
 
Posts: n/a

Default Re: moving to last name in Listbox issue - 04-12-2010 , 10:45 PM



On Apr 11, 9:27*am, "David W. Fenton" <XXXuse... (AT) dfenton (DOT) com.invalid>
wrote:
Quote:
fredg <fgutk... (AT) example (DOT) invalid> wrote innews:175rj52u2dvz.33tedgqo8ao1.dlg (AT) 40tude (DOT) net:

Question .. why doesn't it work the same as a combo box ...
* * *Because it wasn't designed to work like a combo box.

Question .. how do I make it work the same as a combo box? ...
* * *Sorry but a List Box is a List Box and a Combo Box is a Combo
Box. The best you can do is to keep repeating the "h" and it will
jump to the next item that begins with the letter "h".

I agree with your answers, except for your "the best you can do..."
Surely you could combine the listbox with a textbox and filter the
listbox in the textbox's OnChange event. That's not the same as
AutoComplete, but it would make a large listbox easier to use.

--
David W. Fenton * * * * * * * * *http://www.dfenton.com/
usenet at dfenton dot com * *http://www.dfenton.com/DFA/
Yes, that's what I'd do. I go a step further and filter the list box's
contents based on the text typed.

Br@dley

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.