S
Sandy
Hello -
I have a series of sub forms set up in a tab control to manage a table with
a large number of fields. The forms display data as well as calculated
fields. Calculations in some fields use data from fields in other sub-forms.
eg:
=[Forms]![Main Form]![f_quoteSub].[Form]![QBOMTotal]-[Forms]![Main
Form]![f_quoteSub].[Form]![QLabHrsTot]*[labourRate]
With help from Klatuu, I have a function that refreshes each form in the Tab
Control:
unction Run_RefreshForms()
With Me
!f_newjob.Form.Requery
!f_newjob.Form![f_JobSumm-ContactSub].Form.Requery
!f_quotePrep.Form.Requery
!f_quoteSub.Form.Requery
!f_QuoteSummary.Form.Requery
!f_quote.Form.Requery
!f_quote.Form![f_QuoteDetailsSubform].Form.Requery
!f_Schedule.Form.Requery
....etc for each sub form.
End With
DoCmd.Beep
End Function
The function is called at the OnChange event of the TabControl
Private Sub TabCtl0_Change()
Call Run_RefreshForms
End Sub
I can tell the function is running as I coded in the Beep to check.
Here are my issues:
1 ----
When I first select a record, the first time I click on a TabHeading, the
tab Heading control changes to selected [ie goes sunken] , but the form tab
itself does not change. If I click on a second TabHeading, then the proper
tab opens up. This happens each time I change to a different record.
2----
The data is still not refreshing. When I change to a tab that has calculated
fields, the calculated fields only show Zeros. The data in the calculated
fields do refresh when I select the Refresh command from the menu. When I
move to another tab, the data once again reverts to zeros until I do a manual
refresh.
I am quite lost. Any help greatly appreciated.
regards,
sandra
I have a series of sub forms set up in a tab control to manage a table with
a large number of fields. The forms display data as well as calculated
fields. Calculations in some fields use data from fields in other sub-forms.
eg:
=[Forms]![Main Form]![f_quoteSub].[Form]![QBOMTotal]-[Forms]![Main
Form]![f_quoteSub].[Form]![QLabHrsTot]*[labourRate]
With help from Klatuu, I have a function that refreshes each form in the Tab
Control:
unction Run_RefreshForms()
With Me
!f_newjob.Form.Requery
!f_newjob.Form![f_JobSumm-ContactSub].Form.Requery
!f_quotePrep.Form.Requery
!f_quoteSub.Form.Requery
!f_QuoteSummary.Form.Requery
!f_quote.Form.Requery
!f_quote.Form![f_QuoteDetailsSubform].Form.Requery
!f_Schedule.Form.Requery
....etc for each sub form.
End With
DoCmd.Beep
End Function
The function is called at the OnChange event of the TabControl
Private Sub TabCtl0_Change()
Call Run_RefreshForms
End Sub
I can tell the function is running as I coded in the Beep to check.
Here are my issues:
1 ----
When I first select a record, the first time I click on a TabHeading, the
tab Heading control changes to selected [ie goes sunken] , but the form tab
itself does not change. If I click on a second TabHeading, then the proper
tab opens up. This happens each time I change to a different record.
2----
The data is still not refreshing. When I change to a tab that has calculated
fields, the calculated fields only show Zeros. The data in the calculated
fields do refresh when I select the Refresh command from the menu. When I
move to another tab, the data once again reverts to zeros until I do a manual
refresh.
I am quite lost. Any help greatly appreciated.
regards,
sandra