![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 news g9p97tupi03dckcsc99c9l3a6jb50u14c (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 |
#4
| |||
| |||
|
|
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 news g9p97tupi03dckcsc99c9l3a6jb50u14c (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 - |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
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. |
#7
| |||
| |||
|
|
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 news g9p97tupi03dckcsc99c9l3a6jb50u14c (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 |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
You might want to look at Find As You Type: http://allenbrowne.com/AppFindAsUType.html |
#10
| |||
| |||
|
|
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 news g9p97tupi03dckcsc99c9l3a6jb50u14c (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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |