dbTalk Databases Forums  

Llimit Listbox from Textbox dynamically

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


Discuss Llimit Listbox from Textbox dynamically in the comp.databases.ms-access forum.



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

Default Llimit Listbox from Textbox dynamically - 10-17-2011 , 05:36 PM






I have a form used to enter items. On the form I have a list box with
items already entered listed, and a few text boxes to enter new items
and info about them. I am trying to filter the list box as I type new
items. into a text box. Each letter entered would filter the listbox
as it is entered.
Example
Enter a and all items starting with a are shown in list box
Enter b and all items starting with ab are shown, etc.

If the Item I'm looking for is not found, ENTER adds what I have typed
into the list.

If it is found I would cancel the entry.

Is this possible?

Thanks for any help.

JackonLI

Reply With Quote
  #2  
Old   
Access Developer
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-17-2011 , 11:47 PM






The functionality you describe can be implemented using VBA code with a List
Box, but it is built-in to the Combo Box control, and I've always thought it
a tremendous waste to re-implement functionality that is included in the
product right out-of-the-box.

Larry Linson, Microsoft Office Access MVP
"Microsoft Access Small Business Solutions", pub by Wiley, 2010
Access Newsgroup: alive and well in comp.databases.ms-access

<JackonLI> wrote

Quote:
I have a form used to enter items. On the form I have a list box with
items already entered listed, and a few text boxes to enter new items
and info about them. I am trying to filter the list box as I type new
items. into a text box. Each letter entered would filter the listbox
as it is entered.
Example
Enter a and all items starting with a are shown in list box
Enter b and all items starting with ab are shown, etc.

If the Item I'm looking for is not found, ENTER adds what I have typed
into the list.

If it is found I would cancel the entry.

Is this possible?

Thanks for any help.

JackonLI

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

Default Re: Llimit Listbox from Textbox dynamically - 10-19-2011 , 10:46 PM



Thanks for the reply. Unfortunately I was looking for a way to do
what I mentioned, not what your opinion is of doing it.


On Mon, 17 Oct 2011 22:47:15 -0600, "Access Developer"
<accdevel (AT) gmail (DOT) com> wrote:

Quote:
The functionality you describe can be implemented using VBA code with a List
Box, but it is built-in to the Combo Box control, and I've always thought it
a tremendous waste to re-implement functionality that is included in the
product right out-of-the-box.

Larry Linson, Microsoft Office Access MVP
"Microsoft Access Small Business Solutions", pub by Wiley, 2010
Access Newsgroup: alive and well in comp.databases.ms-access

JackonLI> wrote in message
newsg9p97tupi03dckcsc99c9l3a6jb50u14c (AT) 4ax (DOT) com...
I have a form used to enter items. On the form I have a list box with
items already entered listed, and a few text boxes to enter new items
and info about them. I am trying to filter the list box as I type new
items. into a text box. Each letter entered would filter the listbox
as it is entered.
Example
Enter a and all items starting with a are shown in list box
Enter b and all items starting with ab are shown, etc.

If the Item I'm looking for is not found, ENTER adds what I have typed
into the list.

If it is found I would cancel the entry.

Is this possible?

Thanks for any help.

JackonLI

Reply With Quote
  #4  
Old   
Patrick Finucane
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-20-2011 , 02:50 PM



On Oct 19, 10:46*pm, JackonLI wrote:
Quote:
Thanks for the reply. * Unfortunately I was looking for a way to do
what I mentioned, not what your opinion is of doing it.

On Mon, 17 Oct 2011 22:47:15 -0600, "Access Developer"



accde... (AT) gmail (DOT) com> wrote:
The functionality you describe can be implemented using VBA code with a List
Box, but it is built-in to the Combo Box control, and I've always thought it
a tremendous waste to re-implement functionality that is included in the
product right out-of-the-box.

Larry Linson, Microsoft Office Access MVP
"Microsoft Access Small Business Solutions", pub by Wiley, 2010
Access Newsgroup: alive and well in comp.databases.ms-access

JackonLI> wrote in message
newsg9p97tupi03dckcsc99c9l3a6jb50u14c (AT) 4ax (DOT) com...
I have a form used to enter items. *On the form I have a list box with
items already entered listed, and a few text boxes to enter new items
and info about them. *I am trying to filter the list box as I type new
items. into a text box. *Each letter entered would filter the listbox
as it is entered.
Example
Enter a and all items starting with a are shown in list box
Enter b and all items starting with ab are shown, etc.

If the Item I'm looking for is not found, ENTER adds what I have typed
into the list.

If it is found I would cancel the entry.

Is this possible?

Thanks for any help.

JackonLI- Hide quoted text -

- Show quoted text -
Google is your friend.

Reply With Quote
  #5  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-20-2011 , 03:59 PM



You can set up a dynamic query for the listbox. So create the sql
where clause in-line:

strSQL = "Select FieldName From TableName Where FieldName Like " & "'"
& me.textbox1 & "*'"

Me.Listbox.ControlSource = strSQL

Or maybe it would be RowSource...


Anyway, you put that into the textbox Afterupdate event.

Good luck.

Reply With Quote
  #6  
Old   
Access Developer
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-20-2011 , 09:05 PM



Ah, but why would you bother, since the functionality is built-in to the
Combo Box control?

Larry Linson, Microsoft Office Access MVP

<christianlott1 (AT) yahoo (DOT) com> wrote

Quote:
You can set up a dynamic query for the listbox. So create the sql
where clause in-line:

strSQL = "Select FieldName From TableName Where FieldName Like " & "'"
& me.textbox1 & "*'"

Me.Listbox.ControlSource = strSQL

Or maybe it would be RowSource...


Anyway, you put that into the textbox Afterupdate event.

Good luck.

Reply With Quote
  #7  
Old   
Access Developer
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-20-2011 , 09:12 PM



You are welcome.

The only reason I can imagine for going to the extra effort to duplicate
functionality that is built-in to one of the Access controls would be if it
were a school assignment, and we are not here to do homework for students.
But surely you aren't a student wanting your homework done.

Good luck, and when you get it done, good luck in your manager not having
found out in the meanwhile that all your effort was unnecessary.

Larry Linson, Microsoft Office Access MVP

<JackonLI> wrote

Quote:
Thanks for the reply. Unfortunately I was looking for a way to do
what I mentioned, not what your opinion is of doing it.


On Mon, 17 Oct 2011 22:47:15 -0600, "Access Developer"
accdevel (AT) gmail (DOT) com> wrote:

The functionality you describe can be implemented using VBA code with a
List
Box, but it is built-in to the Combo Box control, and I've always thought
it
a tremendous waste to re-implement functionality that is included in the
product right out-of-the-box.

Larry Linson, Microsoft Office Access MVP
"Microsoft Access Small Business Solutions", pub by Wiley, 2010
Access Newsgroup: alive and well in comp.databases.ms-access

JackonLI> wrote in message
newsg9p97tupi03dckcsc99c9l3a6jb50u14c (AT) 4ax (DOT) com...
I have a form used to enter items. On the form I have a list box with
items already entered listed, and a few text boxes to enter new items
and info about them. I am trying to filter the list box as I type new
items. into a text box. Each letter entered would filter the listbox
as it is entered.
Example
Enter a and all items starting with a are shown in list box
Enter b and all items starting with ab are shown, etc.

If the Item I'm looking for is not found, ENTER adds what I have typed
into the list.

If it is found I would cancel the entry.

Is this possible?

Thanks for any help.

JackonLI

Reply With Quote
  #8  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-21-2011 , 09:50 AM



The functionality is not built into the combobox. A combobox displays
a single line, the listbox displays multiple lines.

Reply With Quote
  #9  
Old   
JackonLI
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-21-2011 , 03:45 PM



Thanks for the link. Looks like I can customize this to my need. ;-)

On Fri, 21 Oct 2011 10:29:37 -0700 (PDT), "christianlott1 (AT) yahoo (DOT) com"
<christianlott1 (AT) yahoo (DOT) com> wrote:

Quote:
You might want to look at Find As You Type:

http://allenbrowne.com/AppFindAsUType.html

Reply With Quote
  #10  
Old   
JackonLI
 
Posts: n/a

Default Re: Llimit Listbox from Textbox dynamically - 10-21-2011 , 04:04 PM



I have seen your name here over the years and I have to believe that
you are an expert in Access. Unfortunately this seems to have given
you an arrogance that I really do not understand.

There is nothing listed in this group or its name that indicates it is
for professionals only. And just because you don't see a "need" to do
something one way, as opposed to another, does not mean it is wrong.

Access is a hobby for me. I enjoy creating databases. Mostly for my
own use, and some for friends. I sometimes spend hours trying to get
something to work. Most of the time I succeed. When I am totally
stumped, since I don't have a "Manager" to ask, I look for help on the
internet, and the Newsgroups.

If you have trouble with this, don't respond to my posts.

Have a great day. ;-)


On Thu, 20 Oct 2011 20:12:52 -0600, "Access Developer"
<accdevel (AT) gmail (DOT) com> wrote:

Quote:
You are welcome.

The only reason I can imagine for going to the extra effort to duplicate
functionality that is built-in to one of the Access controls would be if it
were a school assignment, and we are not here to do homework for students.
But surely you aren't a student wanting your homework done.

Good luck, and when you get it done, good luck in your manager not having
found out in the meanwhile that all your effort was unnecessary.

Larry Linson, Microsoft Office Access MVP

JackonLI> wrote in message
news:ja6v97lkguks6leblintogoo28pqok1j48 (AT) 4ax (DOT) com...
Thanks for the reply. Unfortunately I was looking for a way to do
what I mentioned, not what your opinion is of doing it.


On Mon, 17 Oct 2011 22:47:15 -0600, "Access Developer"
accdevel (AT) gmail (DOT) com> wrote:

The functionality you describe can be implemented using VBA code with a
List
Box, but it is built-in to the Combo Box control, and I've always thought
it
a tremendous waste to re-implement functionality that is included in the
product right out-of-the-box.

Larry Linson, Microsoft Office Access MVP
"Microsoft Access Small Business Solutions", pub by Wiley, 2010
Access Newsgroup: alive and well in comp.databases.ms-access

JackonLI> wrote in message
newsg9p97tupi03dckcsc99c9l3a6jb50u14c (AT) 4ax (DOT) com...
I have a form used to enter items. On the form I have a list box with
items already entered listed, and a few text boxes to enter new items
and info about them. I am trying to filter the list box as I type new
items. into a text box. Each letter entered would filter the listbox
as it is entered.
Example
Enter a and all items starting with a are shown in list box
Enter b and all items starting with ab are shown, etc.

If the Item I'm looking for is not found, ENTER adds what I have typed
into the list.

If it is found I would cancel the entry.

Is this possible?

Thanks for any help.

JackonLI


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 - 2013, Jelsoft Enterprises Ltd.