Full Version: Totals On Main Form Not Updating Quickly If Cursor Is On Sub Form
UtterAccess Forums > Microsoft® Access > Access Forms
Lateral
Hi guys,

You have always helped me with my issues and here is another one!

I have been trying to solve this but come to a frustrating end...

I have a main form (let's call it MainForm1)that has a subform (let's call it SubForm1) within it that displays a list of "parts" with their associated costs.

I has a few Text Box's on the main form that total up the parts records and displays an total amounts in $'s.

All of this works well .....except, if the user start the form, the following happens:

1. User clicks button to display MainForm1
2. MainForm1 is displayed and all records in SubForm1 are displayed
3. If the cursor is located in the area occupied by SubForm1, then the totals are not displayed.
4. If the user moves the cursor out of SubForm1 and into MainForm1 area, then the totals get updated.

I have tried Me.Recalc in the Open Event of the MainForm1 and SubForm1 but it does make a difference...

Thanks for any help you can provide

Cheers
Greg
Steve_Woodhouse
Are you sure this is cursor related? Ive never had this and regularly use subforms. Could it be that when the form is loaded that the focus is set to the subform first? I am only guessing by the way and will follow this thread with interest.
Lateral
Hi Steve

Ok, after some more testing this is what I did to fix the issue.

I added the Me.Recalc to the On Current event of the main form...it now works fine.

Your comment "Could it be that when the form is loaded that the focus is set to the subform first? " has me curious...how do I check this?

Cheers
Greg
Steve_Woodhouse
Presumably you have other controls on the form ie command buttons, fields?. In design view on the form check the tab order and see which control is top of the list. It could be the subform.
Lateral
Hi Steve

Yes, I do have numerous controls etc on the main form and subform.

I'm not sure how to check the tab order...can you point me in the right direction?

Cheers
Greg
Steve_Woodhouse
Here you go smile.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.