Hi
I have a db and when I put an unbound text box with a formula in it on the 'main' form as such and it calculates all as intended, but when I put this formula into a query and go to run the query it just says 'Invalid Argument'.
I've done some looking around and my db isn't over 2gb and I don't believe it to be corrupt (I can make queries etc but when I try getting this to work in a query, it gives the error)
The above is what I have and it works perfectly (in the unbound text box) but I want it to be in a query and not an unbound text box, when I put that into a query with all the relevant fields selected it gives me invalid argument.
Would anyone be able to shed some light or let me know if i'm doing something totally wrong or if I may even be going the wrong way about things?
Thanks for looking
I have a db and when I put an unbound text box with a formula in it on the 'main' form as such and it calculates all as intended, but when I put this formula into a query and go to run the query it just says 'Invalid Argument'.
I've done some looking around and my db isn't over 2gb and I don't believe it to be corrupt (I can make queries etc but when I try getting this to work in a query, it gives the error)
Code:
=IIf([eventOneOffFee]>0,[eventOneOffFee],IIf([[Quoted Minimum Numbers]=0,([finalCLientNumbers]*[Full Price])*(IIf([courseDays]=1 Or [courseDays]=3,1,2)),IIf([finalClientNumbers]>[Tier1Delegates] And [Tier1Delegates]>0,(([Quoted Minimum Numbers]*[Full Price])*(IIf([courseDays]=1 Or [courseDays]=3,1,2)))+(([Tier 1 Discount]*([Tier1Delegates]-[Quoted Minimum Numbers]))*(IIf([courseDays]=1 Or [courseDays]=3,1,2)))+(([Tier 2 Discount]*([finalClientNumbers]-[Tier1Delegates]))*(IIf([courseDays]=1 Or [courseDays]=3,1,2))),(([Quoted Minimum Numbers]*[Full Price])*(IIf([courseDays]=1 Or [courseDays]=3,1,2)))+(([Tier 1 Discount]*([finalClientNumbers]-[Quoted Minimum Numbers]))*(IIf([courseDays]=1 Or [courseDays]=3,1,2))))))
The above is what I have and it works perfectly (in the unbound text box) but I want it to be in a query and not an unbound text box, when I put that into a query with all the relevant fields selected it gives me invalid argument.
Would anyone be able to shed some light or let me know if i'm doing something totally wrong or if I may even be going the wrong way about things?
Thanks for looking