#Error

  • Thread starter Thread starter phuser
  • Start date Start date
P

phuser

Main Form has a control box that gets a running total from the subform but
if you navigate to a unit in the Main Form that contains no data the
Subform, the control box reads #Error, I have tried to make the default
value 0 in both boxes but still get the error.
 
Do the calculation in a hidden textbox. In the visible textbox try:

=IIf(IsError([NameOfHiddenTextbox]), 0, [NameOfHiddenTextbox])
 
You can use an expression like:
=IIf(subfrmControl.Form.HasData, subfrmControl.Form!txtOnSub, 0)
 
Perfect!!!!!
Thanks for the Help


Wayne Morgan said:
Do the calculation in a hidden textbox. In the visible textbox try:

=IIf(IsError([NameOfHiddenTextbox]), 0, [NameOfHiddenTextbox])

--
Wayne Morgan
MS Access MVP


phuser said:
Main Form has a control box that gets a running total from the subform
but if you navigate to a unit in the Main Form that contains no data the
Subform, the control box reads #Error, I have tried to make the default
value 0 in both boxes but still get the error.
 
Back
Top