Full Version: Forms refer to controls on hidden form
UtterAccess Forums > Microsoft® Access > Access Forms
I have a large main form that consists of various controls and three different suborms.
Then main form also has 4 controls on it that have a control source that points to 4 controls in the footer of a hidden continuous form. The continuous form is opened by the on open event of the main form.
The 4 controls in the footer of the continuous form all have controls sources that sum a numeric field based on the value of a text field. All of the sums are working correctly.
A command button on the main form toggles wether the hidden form is visible or not.
The on current even of the main "synchs" the hidden form by requery as the record source of the hidden form has a criteria included of the PK from the main form.
Here's where it falls apart.
Currently when I open the main form, none of the text boxes that have a control source pointing to the hidden form controls have any data visible.
If I scroll through the records, nothing changes.....but if I click any of the subforms on the main form or use the Access menu item "Records Refresh" all the sums are visible
What am I missing?
Not really sure, but my guess is that the main form gets painted before the Open event fires, which consequently means that the hidden form is not yet (fully) open by the time the textboxes appear on the screen.
workaround maybe is just as you have already discovered, add a requery or refresh command after the open form command in the open event of the main form.
Hope that helps...
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.