Results 1 to 3 of 3
  1. #1
    Khatru is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    5

    Clear Listbox after Running Report

    I have three list boxes on a form: TermList, SegmentList and YearlyList. These list boxes can either be runindividually or altogether. I want toclear the bar that highlights the option in each list after a report is run,otherwise I have to close the form an reopen it.


    I have tried creatinga button in which the statement on “On Click” would state: TermList.RowSource = “” I have also tried TermList.RowSource =Null. Each Time I try the button I get amessage that states “The object TermList is not found”. I have also tried putting in the list box “AfterUpdate” option: Me.TermList = Null. Thisdid nothing. Any thoughts on what I ammissing. Thanks.

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Sample code to clear the list box bar that highlights the selected item -
    Code:
         Dim i As Integer
    10    For i = 0 To Me.lstItems.ListCount - 1
    20    Me.lstItems.Selected(i) = False
    30    Next i
    The error indicates that the control name TermList is incorrect.

  3. #3
    Khatru is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    5
    Thanks. That worked. I just did not get the result I was hoping for. When I run just one list box, say listsegment, it only gives me results when segment 1 is selected. When I try any other segment I do not get any results. I will post in a new forum.

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

Similar Threads

  1. Replies: 18
    Last Post: 03-19-2013, 08:50 AM
  2. Paramenter Options for Running a Report
    By need_help12 in forum Reports
    Replies: 5
    Last Post: 04-19-2012, 11:30 AM
  3. Replies: 3
    Last Post: 02-13-2012, 08:14 AM
  4. Re-Running a report
    By Alaska1 in forum Reports
    Replies: 19
    Last Post: 10-19-2010, 11:32 AM
  5. Report with Running Sum by week
    By jbarrum in forum Access
    Replies: 2
    Last Post: 01-20-2010, 01:38 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