Refresh

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need to refresh my form via button in order to make visible some subforms
that depend on data entered earlier.
I am using a macro for an append operation and thought it would be a good
idea to have the same macro refresh the screen after the query is run.
There doesn't seem to be a macro command for this, however, so I am
wondering how else I can do this without having to manually refresh the
screen myself.

Thank you.
 
I am using a macro for an append operation and thought it would be a good
idea to have the same macro refresh the screen after the query is run.
There doesn't seem to be a macro command for this, however, so I am
wondering how else I can do this without having to manually refresh the
screen myself.

That seems strange. There should be a Refresh or Requery macro action that
does that.
--


Peace & happy computing,

Mike Labosh, MCSD MCT
Owner, vbSensei.Com

"Veritas e aequitas; in nominae Patri, et Fili, et Spiritus Sancti."
-- The Boondock Saints
 
If you currently have a button to refresh your form, I assume it runs
this code:

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70


You can use this same code as an After Update event when you enter
data; or to the code for another event so you don't have to click an
extra button.

For example if you have a button that runs a macro, its code probably
looks something like this:

Dim stDocName As String

stDocName = "Macro1"
DoCmd.RunMacro stDocName


You can add the refresh code onto it like this:

Dim stDocName As String

stDocName = "Macro1"
DoCmd.RunMacro stDocName
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
 
Thank you VERY much, you just solved not one, but two problems for me.
Fantastic.

Btw, I didn't actually have a button to do the refresh, I was looking for a
way to use one. :)
And while I could certainly use your code in an event and do without a
button, I think I will keep it as an interface element.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top