Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refresh data on sub-form(s) (2003 SP2)

    I've got a simple little DB that has a form displaying the status of a couple of tables. When certain fields are filled, the records are then deemed 'complete'.

    As there are likely to be a few instances of the DB running on different machines I want have the form showing only the incomplete records.

    As a VBA tyro, I haven't figured this one out yet. Did try requery with the 'on timer' event, but no go.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Refresh data on sub-form(s) (2003 SP2)

    I wouldn't use the On Timer event, it'll drive the users to distraction. You might requery the form in its After Update event (although that could be irritating too)

  3. #3
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Refresh data on sub-form(s) (2003 SP2)

    OK it looks like I'll have to stick with what I've got. Users are likely to leave the DB up & running & expect to have all the relevant data on display.

    Cheers

  4. #4
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Refresh data on sub-form(s) (2003 SP2)

    Further issue;
    In a data entry form, there's a button to open another form that displays relevant records (& closes the data entry form). Now if a user puts in their data & clicks the button BEFORE exiting the new record, the recordset form is displayed, but although I've got the record to complete, it doesn't display until the data refreshes automatically.

    I did consider using the timer function, but got myself a bit lost. Any ideas?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Refresh data on sub-form(s) (2003 SP2)

    In the On Click code for the button, include this:

    If Me.Dirty Then
    RunCommand acCmdSaveRecord
    End If

    before opening the other form.

  6. #6
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Refresh data on sub-form(s) (2003 SP2)

    Cheers Hans, works now!

Posting Permissions

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