Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    REfresh Recalc etc (2K/XP)

    I have a main form that has the basic info on a person who bought a grave while he was still alive. When he dies I need to update the info that changes. Therfeore I have a large main form with a continuous form that has all the people who are alive and own graves . When someone dies I click on the ALive/Dead yes no and open a detail form based on the same table as the original form to update and add info. When I close the detail form I want the original form to now reflect the changes I made. I assume I need to put something like forms!frmMain.refresh in the onclose of the detail form. It does not work.
    Is there a good description somewhere of the differences between rferesh recalc repaint and requery?
    Thanks

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

    Re: REfresh Recalc etc (2K/XP)

    Try Requery.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  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: REfresh Recalc etc (2K/XP)

    Instead of putting the code in the onclose event of the other form, I put the code in the onactivate event of the main form. Also I would use requery rather than refresh. Also , it sounds like the subform needs to be requeried, so I would have :

    me!gravessubform.form.requery

    Help in Access explains the difference between refresh and requery as:
    <pre>The Refresh method shows only changes made to records in the current set. Since the Refresh method
    doesn't actually requery the database, the current set won't include records that have been added or
    exclude records that have been deleted since the database was last requeried.
    Nor will it exclude records that no longer satisfy the criteria of the query or filter.
    To requery the database, use the Requery method.
    </pre>

    Regards
    John



Posting Permissions

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