S
Sandra
Hi Have the following OnFocus event on my form:
Private Sub CourseID_GotFocus()
DoCmd.RunMacro "macro.Requery", 1
Me.Amt.SetFocus
which gives me an error:
A macro can call itself a maximum of 20 times
The macro is a simple Requery with no control specified.
I am not sure why the macro is running more than once, since I specified the
Repeat Count as 1. There is not event behind the Amt field that would bring
the focus back to the Course_ID field and cause the macro to run again.
I have also tried the following, which works...
Private Sub Amt_GotFocus()
DoCmd.Requery
.... but it iterates for a few seconds before it shows the final values.
Basically, I have a calculation on one form that updates records on another
form, but the second form does not show the new record unless I manually
press F5. I am trying to get the second form to update using a refresh macro.
Many thanks for your help!
Private Sub CourseID_GotFocus()
DoCmd.RunMacro "macro.Requery", 1
Me.Amt.SetFocus
which gives me an error:
A macro can call itself a maximum of 20 times
The macro is a simple Requery with no control specified.
I am not sure why the macro is running more than once, since I specified the
Repeat Count as 1. There is not event behind the Amt field that would bring
the focus back to the Course_ID field and cause the macro to run again.
I have also tried the following, which works...
Private Sub Amt_GotFocus()
DoCmd.Requery
.... but it iterates for a few seconds before it shows the final values.
Basically, I have a calculation on one form that updates records on another
form, but the second form does not show the new record unless I manually
press F5. I am trying to get the second form to update using a refresh macro.
Many thanks for your help!