Macro timing

  • Thread starter Thread starter Ed Haddock
  • Start date Start date
E

Ed Haddock

First off, I do not write code so I need a macro solution. I have a
complex form with a number of imbedded subforms. I enter the form
using a macro, and immediately need to refresh some data on a subform
with a macro. If I put the Open Form and Refresh commands in the same
macro the refresh is too fast and can't find the subform or other
data. Is there a way to open the form and then delay the refresh until
the form is fully open? It works just fine if I open the form with a
macro, and then trigger the refresh with a button, but that ads a
manual step. I need it to be automatic when the form opens.

Also, I can move from the main form to the imbedded form using the
GoToControl command. How can I move back from the imbedded form to the
main form, without closing the main form and re opening it?

I have been struggling with this for some time and I really would
appreciate any help.
Thanks
Ed Haddock
 
Ed,

I'm not sure without trying it, but I think it might sort out the timing
problem if you put the Refresh in a separate macro, and run this on the
Load event of the main form.

Regarding the other question, I'm afraid I do not know how to do this in
a macro. In VBA, you can do like this:
Me.Parent!SomeControl.SetFocus
 
Back
Top