query too complex

J

jlute

Sorry for the double post. I don't see my first one. In any case, I
made an error in the first one so...

UNEstNtWtNz: Nz([UNEstNtWtw],[UNEstNtWtv])

ULEstNtWt: IIf([UnitUOM]="Ct.",Round([ULNtWtNz]*0.1+[ULNtWt],
6),IIf(IsNull([CSNtWt]),Round([UNEstNtWt]*[ULTotal],
6),Round([UNEstNtWtNz]*[ULSUV],6)))

This returns the "Query too complex" error. I suspect that it's
because Access is trying to run UNEstNtWtNz and ULEstNtWt
simultaneously...?

Your help is greatly appreciated!
 
K

KARL DEWEY

Try this --

ULEstNtWt: IIf([UnitUOM]="Ct.",Round([ULNtWtNz]*0.1+[ULNtWt], 6),
IIf(IsNull([CSNtWt]),Round([UNEstNtWt]*[ULTotal], 6),
Round(Nz([UNEstNtWtw],[UNEstNtWtv])*[ULSUV],6)))
 
J

John W. Vinson

Sorry for the double post. I don't see my first one. In any case, I
made an error in the first one so...

UNEstNtWtNz: Nz([UNEstNtWtw],[UNEstNtWtv])

ULEstNtWt: IIf([UnitUOM]="Ct.",Round([ULNtWtNz]*0.1+[ULNtWt],
6),IIf(IsNull([CSNtWt]),Round([UNEstNtWt]*[ULTotal],
6),Round([UNEstNtWtNz]*[ULSUV],6)))

This returns the "Query too complex" error. I suspect that it's
because Access is trying to run UNEstNtWtNz and ULEstNtWt
simultaneously...?

You (usually!) cannot use the name of a calculated field in a subsequent
calculated field. Try incorporating the NZ() call in the calculation of
ULEstNtWt:

ULEstNtWt: IIf([UnitUOM]="Ct.",
Round([ULNtWtNz]*0.1+[ULNtWt],6),
IIf(IsNull([CSNtWt]),
Round([UNEstNtWt]*[ULTotal],6),
Round(Nz([UNEstNtWtw],[UNEstNtWtv])*[ULSUV],6)))
 
J

JohnLute

Thanks, Karl & John.

I tried this but no good. I kept at it however and finally got it resolved.
Your idea gave me some direction - thanks!

--
www.Marzetti.com


KARL DEWEY said:
Try this --

ULEstNtWt: IIf([UnitUOM]="Ct.",Round([ULNtWtNz]*0.1+[ULNtWt], 6),
IIf(IsNull([CSNtWt]),Round([UNEstNtWt]*[ULTotal], 6),
Round(Nz([UNEstNtWtw],[UNEstNtWtv])*[ULSUV],6)))

--
KARL DEWEY
Build a little - Test a little


Sorry for the double post. I don't see my first one. In any case, I
made an error in the first one so...

UNEstNtWtNz: Nz([UNEstNtWtw],[UNEstNtWtv])

ULEstNtWt: IIf([UnitUOM]="Ct.",Round([ULNtWtNz]*0.1+[ULNtWt],
6),IIf(IsNull([CSNtWt]),Round([UNEstNtWt]*[ULTotal],
6),Round([UNEstNtWtNz]*[ULSUV],6)))

This returns the "Query too complex" error. I suspect that it's
because Access is trying to run UNEstNtWtNz and ULEstNtWt
simultaneously...?

Your help is greatly appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top