I'm getting "Applicatio n-Defined or object-defined error in procedure ..." sometimes, and sometimes not. This happens whenever I try to get the value from one of more of these text boxes on frmOEOrder.
My main form is frmOEOrder and it has multiple tabs. The first tab, pgeGeneral, reveals one of two subpages, either subMisc or subDetail
O
The bold data items are from the underlying dataset that the subform or form is bound to.
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!txtT otal, 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
My main form is frmOEOrder and it has multiple tabs. The first tab, pgeGeneral, reveals one of two subpages, either subMisc or subDetail
O
Code:
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([[B]curFreight[/B]]*[[B]dblExchangeRate[/B]])*NZ([[B]dblTaxFreightPercent[/B]]/100) zstxtTaxMHR is bound to =Sum(cswNullToOne([[B]dblQtyOrdered[/B]])*[[B]dblManHoursRequired[/B]]) txtMHRLabor is bound to =(cswRoundAmount2(cswNullToZero([subDetail].[Form]![zstxtMHRTotal])*cswNullToZero([Forms]![frmOEOrder]![txtHourly]))+cswRoundAmount2(cswNullToZero([subMisc].[Form]![zstxtMHRTotal])*cswNullToZero([Forms]![frmOEOrder]![txtHourly])))*[[B]dblExchangeRate[/B]] zstxtSalesTax is bound to =Sum([[B]curSalesTax[/B]])
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!txtT otal, 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
Comment