View Full Version : If-Then


mrssevans
01-30-2002, 06:05 AM
I have a main form and a subform and here is what I am wanting to do. On the subform I have an unbound text box. I want to say, If ALL the "Completed Dates" on the subform for this record are <>0 then "Workorder Done" otherwise "Workorder Open".

I just having trouble getting it to look at ALL the completed dates for that customers current workorder.

Any suggestions are welcome. Thanks

[This message has been edited by mrssevans (edited 01-30-2002).]

Fornatian
01-30-2002, 10:49 AM
Try something like this in the controlsource for the combo box:

=Iif(Sum(Iif(IsNull(Me![MyField]),1,0)>0,"Open","Done")

If that doesn't do it consider using another count query to get at the answer and drop it on as a subform with one field only with the control form set as something like:

Iif(Me![CountOfOS]>0,"Open","Done")

Ian