Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Listbox Display (MSACCESS 2003)

    I am updating a table, and as it incremenatlly updates I want to show whats happened in a listbox. The listbox has its own rowsource to the table. However it does not fill with records unless I close and reopen the form. The form is unbound as well as the list. I have tried doevents but that does not work. What am I doing wrong? Thanks

    rst.AddNew
    rst![Athlete] = Me.NN4.Caption
    rst![DocumentName] = Keep
    rst.Update
    '
    Me.List50.Requery: DoEvents

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Listbox Display (MSACCESS 2003)

    Normally a requery will show the latest.

    But i see you have that already.

    If we are not much help send your compacted zipped database.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Listbox Display (MSACCESS 2003)

    Why do you have the Do Events in there?

    I pasted your code into a form (without the Do Events) and the listbox updated immediately.
    Regards
    John



  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Listbox Display (MSACCESS 2003)

    You might want to try a "Me.Repaint". Sometimes this helps.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listbox Display (MSACCESS 2003)

    Many thanks both. I deleted the listbox and added a new one, and that fixed it??
    Regarding DoEvents, as the listbox is filled within a large section of code, I wanted to make sure each time I was trying to make it work it did the update of the list first. I no sometimes the code does what it likes in the order it wants so it was only a temporary addition.

  6. #6
    4 Star Lounger
    Join Date
    Feb 2008
    Location
    United Kingdom
    Posts
    490
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Listbox Display (MSACCESS 2003)

    Thanks Mark, I will remember that one next time. Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •