I have an unbound form that looks up various pieces of a product number entered in an unbound text box (ProductNumber) and returns weights and lengths in unbound listboxes that are based on queries.
The criteria for the queries are based on functions that return a specific string from the product number.
Then there is a calculated textbox control (txtCombinedLenmm AND txtCombinedWeights) based on the list box controls (which is also the listbox's underlying query's value). The calculation only uses the control if there is a result in that listbox control.
On the On_Exit of the product number control:
all associated controls are being requeried, the calculated textbox's control source is determined and then the calculated control is requeried:
Expand|Select|Wrap|Line Numbers
- Me.txtCombinedLenmm.ControlSource = "=IIf(nz([lstRingSizeGroundmm],0)=0 And nz([lstRingSizemm],0)=0,Round(CDbl(nz([lstSusLenmm],0))+CDbl(nz([lstLPlenmm],0))+146.05,2),CDbl(Round(nz([lstSusLenmm],0)+nz([lstLPlenmm],0)+nz([lstRingSizemm],0)+nz([lstRingSizeGroundmm],0)+146.05,2)))"
- Me.txtCombinedWeights.ControlSource = "=Round(nz([lstSusWgtKg],0)+nz([lstLPwgtKg],0)+nz([txtKgRingWgtGrnd],0)+nz([txtKgRingWgt],0),2)"
Expand|Select|Wrap|Line Numbers
- Me.txtCombinedLenmm.Requery
- Me.txtCombinedWeights.Requery
Thank you in advance for any help - nothing logical seems to be working.
with ruth