Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > BOOK: Beginning Access 2003 VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2005, 11:18 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old February 14th, 2005, 12:15 PM
Registered User
 
Join Date: Feb 2005
Location: , , .
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


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.