473,884 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

listbox -> filter -> listbox

how do I create a list box that I can use to filter the records in
another list box on a form.

May 4 '06 #1
2 6375
use an afterupdate on the first listbox to set the rowsource on the
second listbox based on the bound field in the first listbox.

Private Sub ListBox1_AfterU pdate()
ListBox2.RowSou rce = "SELECT Field1, Field FROM Table WHERE
Colmun1 = " & ListBox1

End Sub

May 4 '06 #2
if you set the MultiSelect property of the listbox to Extended
(something other than single), then you have to iterate through the
collection of selected items.

Dim varItem as variant

for each varItem in lbx.ItemsSelect ed
debug.print lbx.ItemsSelect ed(varItem)
next varItem

It's on www.mvps.org/access Look up "multi-select" and you'll find it.

May 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1984
by: orahm | last post by:
I added an object to a listbox. This object is a complex number and not a string so it shows "Consolapplication.Complex" as a list item. If I convert the complex number to a string then it shows a string which is correct but also store's it in the listbox as a string. I wan't to store it as a complex number but view it as a string. How do I go about doing that?
7
1311
by: ZippyV | last post by:
Hello, I would like to populate a listbox with values A to Z. What would be the best and fastest way to do this? I tried to use a for-loop but I don't know how I would change the current char value to the next letter.
2
1954
by: Art | last post by:
Hi (again), I'm populating a ListBox from a DataTable. Is there a way to have the ListBox only display certain values from the DataTable? I'm using the DataTable as the DataSource for the ListBox. Art
1
1819
by: Valerie | last post by:
Hello everyone, I am new in PHP-programming but I am learning the basics of it. I've got a script that uploads a picture together with all data from the inputform, to the server and places the pathname into the Mysql. I desperately want to have the uploaded pictures resized in the meantime. Does anyone know how to do this ? Or perhaps adjust the script with the functions, necessary for resizing ? I would appreciate it VERY VERY much !...
0
1809
by: dagobert2000 | last post by:
Hi! First of all, I'm using a the latest Version of a FUSD Module...for my device-driver. I have the following situation: I have a PPP connection over a serial (RFCOMM-)device. That works fine! But now i want to put a DeviceDriver-Module in front of the RFCOMM-Device, so that PPP uses my DeviceDriver-Module. The Module just forwards the data from PPP to the RFCOMM device - no data is changed (later the module shall filter some...
2
1745
by: =?Utf-8?B?Sm9uYXRoYW4=?= | last post by:
Hi I so new to vb.net that the paints still wet... I would like to load a listbox (as I would do using vba). The properties show multicolumn = true column width = 300 How do I set the individual column widths? listbox1.add(newItem) appends a new item to my list. How do I add the additional column for each list item?
0
1412
by: IMAFriend | last post by:
Hello everyone. This maybe is easy, but I'm stuck. I'm using visual basic.net. And this is with the enumwindows function. But that isn't relevant. If I have a sub that just simply will add an item to a listbox, but takes the handle to the listbox as a parameter, how can I 'convert' that handle back to a listbox?
2
4441
by: vinod allapu | last post by:
hi all, i am trying to generate a report, iam using sql server 2000 and Asp.net 2.0. First to select the columns iam using the list box... as we can order by the query result from the selected columns only, i want to use another list box which contains only selected columns.. 1. Iam filling the columns names required into the listbox it is selecting the columns in the select statement to generate report. 2....
1
1531
by: Dawg62 | last post by:
DB is attached. On the listboxt updates 8 fields. The other fields I fill in myself. Ideally I would like to have an enter button to insert the updated data from the form to the table below that can not be updated unless I do some changes on the form. The listbox is information that does not change. I add the dropdown info on another form as new studies are started. I'm trying to show history for each study. The information should filter by...
0
9954
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10426
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9591
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3242
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.