My main form is frmOEOrder and it has multiple tabs. The first tab, pgeGeneral, reveals one of two subpages, either subMisc or subDetail
O
Expand|Select|Wrap|Line Numbers
- n frmOEOrder
- !txtTotal is bound to
- =cswNullToZero([txtSubtotal])+cswRoundAmount2([txtTax])+cswNullToZero([txtFreight])+cswNullToZero([txtMHRLabor])
- !txtTax is bound to
- =cswRoundAmount2(cswNullToZero([subDetail].[Form]![zstxtSalesTax])+cswNullToZero([subMisc].[Form]![zstxtSalesTax])+NZ([zstxtTaxFreight])+NZ([zstxtTaxMHR]))
- !txtSubtotal is bound to
- =cswNullToZero([Forms]![frmOEOrder].[subDetail].[Form]![zstxtTotal])+cswNullToZero([Forms]![frmOEOrder].[subMisc].[Form]![zstxtTotal])
- zstxtTaxFreight is bound to
- =Nz([curFreight]*[dblExchangeRate])*NZ([dblTaxFreightPercent]/100)
- zstxtTaxMHR is bound to
- =Sum(cswNullToOne([dblQtyOrdered])*[dblManHoursRequired])
- txtMHRLabor is bound to
- =(cswRoundAmount2(cswNullToZero([subDetail].[Form]![zstxtMHRTotal])*cswNullToZero([Forms]![frmOEOrder]![txtHourly]))+cswRoundAmount2(cswNullToZero([subMisc].[Form]![zstxtMHRTotal])*cswNullToZero([Forms]![frmOEOrder]![txtHourly])))*[dblExchangeRate]
- zstxtSalesTax is bound to
- =Sum([curSalesTax])
I notice when I am debugging, as I stop at various places, sometimes #Error# is displayed in these texboxes that are bound to a formula.
The specific thing that gives me a problem is when the user clicks on another tab, the pgeDetail tab. In the tab_Change event I want to get the value from frmOEOrder!txtTotal, but I cannot access the value at that time, I get the Application-Defined or object-defined error.
What is determining whether I can access these text boxes or not? Must the subform be in focus or something like that? Do I have to capture this txtTotal value before the tab Change event?
Thanks,
Jim