Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2004, 09:30 AM
Authorized User
 
Join Date: Jun 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remove entries from listview on click

Hi All,

I have a listview that contains users and I want to multiselect them and click a remove button and have them deleted from the Access Database.

Any ideas??

Many thanks,

Paul
 
Old September 20th, 2004, 08:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Sure, easy enough to do... store the ID and put it in a hidden field in the list view, then you can reference that later.

Brian
 
Old December 23rd, 2004, 06:36 AM
Registered User
 
Join Date: Dec 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Peppiniello
Default

Uhm... did you try the "CheckBox feature" using a listbox control? Is more powerful!

Peppiniello
 
Old December 23rd, 2004, 04:44 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When you add the items to the ListView, store the record ID in the Tag or Key property (as you prefer) of the ListItem. In the remove button event, use a for each ListItem to loop through the list, and if the item is selected remove the record using the tag/key property and the item itself

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Display ListView click value Intel.Leiria Access VBA 0 September 27th, 2005 03:09 PM
Remove entries from listview on click neo_jakey Beginning VB 6 2 September 28th, 2004 09:50 AM
Remove entries from listview and database on click neo_jakey Pro VB Databases 1 September 20th, 2004 12:21 PM
Remove entries from listview and database on click neo_jakey VB Databases Basics 2 September 20th, 2004 10:37 AM
Remove entries in a list box rfinks Classic ASP Basics 1 October 15th, 2003 12:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.