Thanks for the pointer there, but that code is working fine (i.e. it is able
to read what is in the textbox on the subform). Now how do I get your
suggested solution incorporated in the Text box-(Main form)?
=iif(IsError([TextBox]),0,[TextBox])
It keeps coming up with a error msg "expression you entered contains invalid
syntax".
> I think your syntax should just be
> =[x_F_Area subform]!Text10
[quoted text clipped - 29 lines]
> > > >
> > > > Thanks!
Dennis - 29 Apr 2005 13:12 GMT
Is it just as simple as putting the iif IsError around the field on the sub
form instead ?
> Thanks for the pointer there, but that code is working fine (i.e. it is able
> to read what is in the textbox on the subform). Now how do I get your
[quoted text clipped - 38 lines]
> > > > >
> > > > > Thanks!
MSA - 29 Apr 2005 13:44 GMT
Forgive my ignorance as I just started developing with access/forms.
Where excactly should I put your suggested code
Here is the layout
Subform Textbox (named Text10) Control Source Property has:
=Sum([Quantity SSU])
Which is being read by the other Text box (named Text16) on the Main form
Mainform Textbox Control Source Property has:
=[x_F_Area subform].Form!Text10
Given the above where should I put the code, thanks.
> Is it just as simple as putting the iif IsError around the field on the sub
> form instead ?
[quoted text clipped - 41 lines]
> > > > > >
> > > > > > Thanks!
Dennis - 29 Apr 2005 13:50 GMT
in the control source of Text10 on your subform
=iif(IsError(Sum([Quantity SSU])),0,Sum([Quantity SSU]))
> Forgive my ignorance as I just started developing with access/forms.
>
[quoted text clipped - 55 lines]
> > > > > > >
> > > > > > > Thanks!
Marshall Barton - 29 Apr 2005 15:25 GMT
Try using two text boxes on the main form. Make a new one
named txtSubTotal and set its Visible property to No and
control source expression to:
=[x_F_Area subform].Form!Text10
This text box will have #Error, but since it's invisible it
won't matter.
Now your existing text box can use Dennis' expression:
=IIf(IsError([txtSubTotal]), 0, [txtSubTotal])

Signature
Marsh
MVP [MS Access]
>Thanks for the pointer there, but that code is working fine (i.e. it is able
>to read what is in the textbox on the subform). Now how do I get your
[quoted text clipped - 38 lines]
>> > > >
>> > > > Thanks!