Results 1 to 4 of 4
  1. #1
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162

    Clearing results from a listbox using a button

    Hi all,



    Can anyone help please? Im trying to clear a listbox using vba from the press of a button. Ive got the listbox clearing on load using
    Code:
    Me.TimeApproval_lstbox.RowSource = ""
    but I would also like to clear it on demand - any ideas?

    Thanks in advance

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Put that same code in the Click event of a CommandButton.

  3. #3
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162
    I could have sworn I did that already and it didnt work - oh well works now. Thanks!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Glad we gould help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Clearing a Form
    By dabatman in forum Forms
    Replies: 4
    Last Post: 01-20-2012, 11:51 AM
  2. Converting Variant Listbox Results
    By dreamnauta in forum Programming
    Replies: 4
    Last Post: 01-03-2012, 12:24 PM
  3. Display RESULTS of Query into LISTBOX?
    By taimysho0 in forum Programming
    Replies: 6
    Last Post: 11-22-2011, 10:05 PM
  4. multi-select listbox and new entry button
    By user622 in forum Forms
    Replies: 2
    Last Post: 07-05-2011, 09:14 AM
  5. Form listbox button commmand
    By PATRICK in forum Forms
    Replies: 3
    Last Post: 04-16-2011, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums