Refreshing a form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Baker

    Refreshing a form

    HI again:

    I have a form with totals on it, and I am changing the contents of the data base the
    totals are derived from. Specifically, I am deleting the contents of one table and adding
    it to another. I don't appear to be able to get the totals to refresh when the contents of
    the table are removed. At the top of the screen is a function records/refresh which does
    update the totals, but i have been unable to replicate the function in a macro.

    Can someone clue me i as to how that is done?

    Thanks

    John Baker
  • Larry  Linson

    #2
    Re: Refreshing a form

    I haven't done any macros other than AutoExec and AutoKeys in a long time,
    but the _action_ you are looking for is "Requery". If you were using VBA
    code, then in the code where you change the data you'd use
    Forms!<theopenf ormsname>.Reque ry after each change to the data.

    Larry Linson
    Microsoft Access MVP

    "John Baker" <Baker.JH@Veriz on.net> wrote in message
    news:c2mg101v6h upp7bclv7tr04u9 etl24gi2l@4ax.c om...[color=blue]
    > HI again:
    >
    > I have a form with totals on it, and I am changing the contents of the[/color]
    data base the[color=blue]
    > totals are derived from. Specifically, I am deleting the contents of one[/color]
    table and adding[color=blue]
    > it to another. I don't appear to be able to get the totals to refresh when[/color]
    the contents of[color=blue]
    > the table are removed. At the top of the screen is a function[/color]
    records/refresh which does[color=blue]
    > update the totals, but i have been unable to replicate the function in a[/color]
    macro.[color=blue]
    >
    > Can someone clue me i as to how that is done?
    >
    > Thanks
    >
    > John Baker[/color]


    Comment

    • John Baker

      #3
      Re: Refreshing a form

      THank you
      John Baker
      "Larry Linson" <bouncer@localh ost.not> wrote:
      [color=blue]
      >I haven't done any macros other than AutoExec and AutoKeys in a long time,
      >but the _action_ you are looking for is "Requery". If you were using VBA
      >code, then in the code where you change the data you'd use
      >Forms!<theopen formsname>.Requ ery after each change to the data.
      >
      > Larry Linson
      > Microsoft Access MVP
      >
      >"John Baker" <Baker.JH@Veriz on.net> wrote in message
      >news:c2mg101v6 hupp7bclv7tr04u 9etl24gi2l@4ax. com...[color=green]
      >> HI again:
      >>
      >> I have a form with totals on it, and I am changing the contents of the[/color]
      >data base the[color=green]
      >> totals are derived from. Specifically, I am deleting the contents of one[/color]
      >table and adding[color=green]
      >> it to another. I don't appear to be able to get the totals to refresh when[/color]
      >the contents of[color=green]
      >> the table are removed. At the top of the screen is a function[/color]
      >records/refresh which does[color=green]
      >> update the totals, but i have been unable to replicate the function in a[/color]
      >macro.[color=green]
      >>
      >> Can someone clue me i as to how that is done?
      >>
      >> Thanks
      >>
      >> John Baker[/color]
      >[/color]

      Comment

      • John Baker

        #4
        Re: Refreshing a form

        Larry:

        Im sorry but that does not work for me. On Requery for the specific form that contains the
        totals NOTHING appear to change. This is after I have moved the records out of the table
        that I am counting.

        Any other suggestions -- how would I do it in VBA, since I can call a VBA routine from a
        macro.

        Regards

        John Baker

        "Larry Linson" <bouncer@localh ost.not> wrote:
        [color=blue]
        >I haven't done any macros other than AutoExec and AutoKeys in a long time,
        >but the _action_ you are looking for is "Requery". If you were using VBA
        >code, then in the code where you change the data you'd use
        >Forms!<theopen formsname>.Requ ery after each change to the data.
        >
        > Larry Linson
        > Microsoft Access MVP
        >
        >"John Baker" <Baker.JH@Veriz on.net> wrote in message
        >news:c2mg101v6 hupp7bclv7tr04u 9etl24gi2l@4ax. com...[color=green]
        >> HI again:
        >>
        >> I have a form with totals on it, and I am changing the contents of the[/color]
        >data base the[color=green]
        >> totals are derived from. Specifically, I am deleting the contents of one[/color]
        >table and adding[color=green]
        >> it to another. I don't appear to be able to get the totals to refresh when[/color]
        >the contents of[color=green]
        >> the table are removed. At the top of the screen is a function[/color]
        >records/refresh which does[color=green]
        >> update the totals, but i have been unable to replicate the function in a[/color]
        >macro.[color=green]
        >>
        >> Can someone clue me i as to how that is done?
        >>
        >> Thanks
        >>
        >> John Baker[/color]
        >[/color]

        Comment

        Working...