Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Timing delay (A2K)

    I'm back on the same topic yet once again.

    I have a form with a combobox. The RowSource of the combobox is a query pulling two fields from a table. An entry is selected from the combobox and the detail for that item is pulled from the table and displayed on the form. The form uses 'New', 'Edit', 'Save', and 'Delete' buttons to explicitly manipulate records in the table.

    If I 'Save' a new record and drop down the combobox in less than about three seconds, the new record won't be there.

    If I 'Delete' a record and drop down the combobox in less than about three seconds, the record will still be in the list and if I select it, the line will change to #Deleted#.

    In either case, if I count to three before dropping the combobox, the list will be correct.

    Here is the key point: the table is in a backend mdb. The form and query are in my front end mdb (to be mde on deployment).

    I have put the following code at the end of all the Save and Delete operations:

    DBEngine.Idle dbRefreshCache
    DoEvents

    I have put the following code in the combobox OnEnter event:

    DBEngine.Idle dbRefreshCache
    DoEvents
    cboEvent = Null
    cboEvent.Requery

    All of this is to no avail.

    And here is the punch line: I hacked a copy of my app and moved the table from the backend into the front-end; the delay disappeared -- I can't get to the combobox quick enough to see it display incorrectly.

    So . . . what is the check to see if there are pending operations to an external database?
    Or what else can I try?

    TIA
    Donald

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

    Re: Timing delay (A2K)

    Using a backend table on a server will always result in some time delay, there is no escaping that. In your situation, however, I would move that .requery to the form's AfterUpdate event rather than in the combo box's OnEnter event.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Timing delay (A2K)

    Is there anything I can query or test to determine that there is still activity going on with the backend? Or is there a flag set somewhere indicating that everything is complete in a process going to the backend?
    TIA
    Donald

  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: Timing delay (A2K)

    >>Is there anything I can query or test to determine that there is still activity going on with the backend? Or is there a flag set somewhere indicating that everything is complete in a process going to the backend?<<

    No there isn't.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Timing delay (A2K)

    The form AfterUpdate event doesn't fire when I save or delete a record. I'm not completely sure about the bound versus unbound form debate, but I suspect that I am running unbound. I have code connected to buttons to save and delete records and I load my fields programatically rather than with the ControlSource property.
    Donald

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

    Re: Timing delay (A2K)

    That's true, then there is no AfterUpdate event. You would have to put it in the code for your Save & Delete buttons.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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