Hi,Originally Posted by mdmackillop
I edited my post to remove completely wrong approach so it wouldn't take place anymore. Sorry, if you read it before I delete it.
I was wrong. I thought that Status values are supposed to be stored as combination of totals of selections. Now I see that it is supposed to retrieve different Status valued records...
However;
In your database, in MakeSQL function, following line has a syntax error :
TotVal = MtVal0 + MyVal1 + MyVal2 + MyVal3
MtVal0 should be MyVal0.
Also DoCmd.RunSQL SQL wouldn't work for SELECT queries, so it will create the correct SQL string that you would need but you should assign this SQL string as Record Source to another form (for example a subform in this main form) to retrieve & display queried records.
I attached a modified version of your DB by using my suggestiong above.
Suat