Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002

    Unanswered: Listbox requery problems in Access 97

    I have a listbox that gets its data by querying a table.
    The user is able to double-click on an item in the list
    and have a popup form appear which allows the user to edit
    the item in the list. The listbox needs to requery the
    table rather often, so that as the user modifies the
    table, the changes will be immediately reflected in the

    I have attempted to accomplish this by setting the form's
    OnTimer event to requery the listbox every 1000ms. To
    avoid getting an Error 2118, I have the OnTimer event save
    the record before requerying the listbox. However, this
    has adverse effects, such as causing the cursor to act
    funny while editting fields in the popup form, and
    eliminating the possibility of having a cancel button on
    the popup form, as the record is being saved constantly.
    Can I:

    1) Somehow pause the form with the listbox while the popup
    form is open, and/or

    2) Requery the listbox without saving the record?

    Thanks in advance for any insight.

  2. #2
    Join Date
    Feb 2002
    Turn the timer off.

    Try using this method.

    When the form pops up for editing the user edits away. On the after update event use Docmd.RunCommand AcCmdSaveRecord to force a save, then Form_MyOtherForm.ListBox.Requery.

    I may not have this firing exactly where it should but an approach like this should work.

Posting Permissions

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