Connecting Tech Pros Worldwide Help | Site Map

me.refresh issue (reprise)

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:41 PM
John Baker
Guest
 
Posts: n/a
Default me.refresh issue (reprise)

HI again:

I have made 2 posts on this issue, and for some reason still haven't got the right result.

I have a form which contains a number of totals. These totals use unbound control boxes
and are of the form: =Dcount("field","table"). The form contains a number of buttons which
trigger queries (using a macro) that update some tables and delete records from others.
The effect of these macros is to change the counts that should register in the =dcount
fields.

HOWEVER -- when the buttons are pressed, the queries executed and the records moved
around, the totals remain as they were before the buttons were pressed.

I first tried changing from macros to code. The code looks like this:


Private Sub Command1_Click()
Run ("committimseheets")
Me.Refresh

End Sub

This routine ended up with ONLY the form in question active -- all other forms and such
like are closed in the macro. Hence, I would think that the me.Refresh would focus on the
form I am interested in. Still there is NO refreshing!

I have a button (just to test things out) on the form which executes a single line of
code: "me.refresh", and that works fine, but it doesn't do anything else,

Can someone suggest what I am doing wrong. It apepars that somehow the macro and the
"Me.Refresh" are not working in total harmony.

I apologize for reurning to this group with the same basic problem a number of times, but
somehow the nature of the problem appears to change with each answer I get.

Regards

John Baker

  #2  
Old November 12th, 2005, 06:41 PM
4Fraza
Guest
 
Posts: n/a
Default Re: me.refresh issue (reprise)


Try me.requery.
That will update the recordset, not just the calculations.
Note that this will move the user to the starting record, so you may want to make a note of the current record, and move them back there afterwards.

Regards,

Fraser.

John Baker <Baker.JH@Verizon.net> wrote:[color=blue]
>HI again:
>
>I have made 2 posts on this issue, and for some reason still haven't got the right result.
>
>I have a form which contains a number of totals. These totals use unbound control boxes
>and are of the form: =Dcount("field","table"). The form contains a number of buttons which
>trigger queries (using a macro) that update some tables and delete records from others.
>The effect of these macros is to change the counts that should register in the =dcount
>fields.
>
>HOWEVER -- when the buttons are pressed, the queries executed and the records moved
>around, the totals remain as they were before the buttons were pressed.
>
>I first tried changing from macros to code. The code looks like this:
>
>
>Private Sub Command1_Click()
>Run ("committimseheets")
>Me.Refresh
>
>End Sub
>
>This routine ended up with ONLY the form in question active -- all other forms and such
>like are closed in the macro. Hence, I would think that the me.Refresh would focus on the
>form I am interested in. Still there is NO refreshing!
>
>I have a button (just to test things out) on the form which executes a single line of
>code: "me.refresh", and that works fine, but it doesn't do anything else,
>
>Can someone suggest what I am doing wrong. It apepars that somehow the macro and the
>"Me.Refresh" are not working in total harmony.
>
>I apologize for reurning to this group with the same basic problem a number of times, but
>somehow the nature of the problem appears to change with each answer I get.
>
>Regards
>
>John Baker[/color]

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.