Wrox Programmer Forums
|
BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7
This is the forum to discuss the Wrox book Beginning Microsoft Visual Basic 2008 by Thearon Willis, Bryan Newsome; ISBN: 9780470191347
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 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 January 1st, 2010, 06:47 PM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Chapter 5 Cleaning Up - Clear

Doing Try it out Structure Demo and have entered all code to enable List Customer button to clear customers from ListBox. No longer get error message but when I click List Customer button 2d time, list box does not clear. Unable to download code from website to compare. Anyone have same problem
 
Old May 17th, 2010, 08:59 PM
Authorized User
 
Join Date: May 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there, phread. I walked through the Structure Demo, and I also didn't have an exception thrown when I click on the[List Customer] button a second time.

But...

I am wondering if you might be expecting the data within the "lstCustomers" listbox that was populated on the very first[List Customer] button click, to then be cleared so that "lstCustomers" is blank when "btnListCustomer" is clicked the second time.

The[List Customer] button does indeed clear the list, but also calls on the CreateCustomer method, and ends-up repopulating "lstCustomer" with the same data.

The lesson didn't call for it, but I suppose you could add a new button (say, a "Clear Form" button), that would show "lstCustomers" cleared and emptied, and I wonder if that's the behavior that you were expecting.





Similar Threads
Thread Thread Starter Forum Replies Last Post
closing and cleaning up multiple recordsets Loralee Access 1 September 26th, 2005 05:46 PM
Cleaning a Place Holder from a class see07 ASP.NET 1.x and 2.0 Application Design 4 March 15th, 2005 12:28 PM
Cleaning up resources jbenson001 ASP.NET 1.x and 2.0 Application Design 2 January 22nd, 2004 11:50 AM
Cleaning up data rlull SQL Server 2000 1 September 3rd, 2003 03:27 PM
Suppressing/cleaning previous entries gurevle HTML Code Clinic 1 June 24th, 2003 12:08 PM





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