That won't work.But I want the place or location of this button in the main form
Thanks a lot for the replyThat won't work.
Why?
Because Access automagically saves the subform record when you move focus from the subform to any control on the main form so by the time your code in the mainform runs, the data from the subform has already been saved.
So, the question becomes what are you trying to do or prevent that you can't just let Access automatically save or don't want to put the save button on the subform?
So, did the suggested code work or not?Thanks a lot for the reply
I know. Access saves the data as soon as you move to the next field. What I want is to refresh the form because there is an unstructured field where the sum of records is calculated and another field that calculates the sum of vacation days. I can't see that unless I close and open the form or go back in the records.
No it didn't workSo, did the suggested code work or not?
Try this code for your button.What I want is to refresh the form because there is an unstructured field where the sum of records is calculated and another field that calculates the sum of vacation days. I can't see that unless I close and open the form or go back in the records.
Me.Recalc
Why couldn’t you mention your requirements in your first post?Thanks a lot for the reply
I know. Access saves the data as soon as you move to the next field. What I want is to refresh the form because there is an unstructured field where the sum of records is calculated and another field that calculates the sum of vacation days. I can't see that unless I close and open the form or go back in the records.
No. That is incorrect.Access saves the data as soon as you move to the next field.
Thank you very much Sherk. The code worked fine.Try this code for your button.
Code:Me.Recalc
Glad to hear you got it sorted out. Good luck with your project.Thank you very much Sherk. The code worked fine.
Sherk????Thank you very much Sherk. The code worked fine.