Results 1 to 3 of 3
  1. #1
    plengeb is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    20

    List Box Items Are De-Selected On A Screen Refresh


    Hello. I have an access form with a list box for selecting multiple values. When I run Visual Basic code, the screen is refreshed, and the values in the list box become de-selected. Can someone please tell me how to keep the list box values selected, or to automatically re-select the values on a screen refresh? Thank you very much. Bill

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    ...the screen is refreshed...
    Can you show us the code that does this.
    Is the form a bound form.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    plengeb is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    20
    The form is not bound. The statements are run in a module, from a macro.

    This is the code that runs from the listbox, and it runs correctly.
    For Each varItm In ctl.ItemsSelected
    CodeString = CodeString & "'" & varItm & "',"
    DEAString = DEAString & varItm & ", "
    Next varItm

    This is the refresh statement in which the list box items become de-selected.
    Forms!SampleMaster.Refresh

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

Similar Threads

  1. Replies: 18
    Last Post: 01-27-2012, 12:53 PM
  2. Replies: 6
    Last Post: 07-10-2011, 05:33 PM
  3. Replies: 4
    Last Post: 06-16-2011, 09:30 PM
  4. Replies: 5
    Last Post: 04-04-2011, 09:57 AM
  5. Selected items in listbox
    By tomodachi in forum Access
    Replies: 1
    Last Post: 09-09-2010, 01:14 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