Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > BOOK: Beginning Access 2003 VBA
|
BOOK: Beginning Access 2003 VBA
This is the forum to discuss the Wrox book Beginning Access 2003 VBA by Denise M. Gosnell; ISBN: 9780764556593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Access 2003 VBA 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 February 11th, 2005, 11:18 AM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap 12 Project tracker - listboxes don't clear

Hi Access folks/folkesses,

I am getting to know the chap12 solution Project Tracker database and in the projects for the listboxes don't clear when you click 'Add New'. I wondered if anyone had managed to find a solution to this in vba or if anyone know how to in this case.

The listboxes for Comments, Contacts and Attachments are embedded in the tabcontrol. The remaining controls on the form clear via a routine which clears first the object and then the form control.

It does not work to use simple code like the following
    'clear the List boxes
    'lstComments
    [Forms]![frmProjects]![lstComments].Value = ""


Looks like a bug for Wrox. Please help.

trancelife

 
Old February 14th, 2005, 12:15 PM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found a solution to this:

put the following code (after declaring the vars) in ClearProjectsControls:

    'clear the List boxes
    'clear lstComments
    lngListCount = Me.lstComments.ListCount
    For intCurrentRow = 1 To lngListCount
        Me.lstComments.RemoveItem (0)
    Next intCurrentRow

    'clear lstContacts
    lngListCount = Me.lstContacts.ListCount
    For intCurrentRow = 1 To lngListCount
        Me.lstContacts.RemoveItem (0)
    Next intCurrentRow

    'clear lstFileAttachments
    lngListCount = Me.lstFileAttachments.ListCount
    For intCurrentRow = 1 To lngListCount
        Me.lstFileAttachments.RemoveItem (0)
    Next intCurrentRow







Similar Threads
Thread Thread Starter Forum Replies Last Post
chap 12 exer 2 harper BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 0 January 31st, 2008 10:19 AM
Error Creating Project Time Tracker Database flashmanTom SQL Language 0 January 15th, 2008 04:09 PM
Problem with creating SQL Project Time Tracker Jim Dean BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 5 August 31st, 2006 12:23 PM
chap. 12 -cmstables.php niy BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 January 12th, 2005 02:36 PM





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