Hello,
I am having a strange error. I have a calculated field and when you run the query the user inputs the threshold to return select results from the calculated field. I have pasted the SQL statement below. When I select a threshold of "30" everything works. When I change that threshold to "100" it does not work and appears to return everything. But if I just put 100 in the criteria and not have it [user defined] then it works as expected. Both of the fields used in the calculation are stored as numbers. I am assuming it's a type error in the calculation but I have no idea.
SELECT Header.Hole_NUM, [Geochemistry - Samples].SAMP_Length_m, [Geochemistry - Samples].SAMP_Lith_Class, [Geochemistry - Samples].SAMP_Class, [Pb206-p_ppm]/[Pb204-p_ppm] AS [Pb-p206/204]
FROM Header INNER JOIN ([Geochemistry - Samples] INNER JOIN [Geochemistry - Results] ON ([Geochemistry - Samples].SAMP_Group_Num = [Geochemistry - Results].RESU_Group_Num) AND ([Geochemistry - Samples].SAMP_Num = [Geochemistry - Results].RESU_Sample_Num)) ON Header.Hole_NUM = [Geochemistry - Samples].SAMP_Hole_NUM
WHERE ((([Geochemistry - Samples].SAMP_Lith_Class)="SDST") AND (([Geochemistry - Samples].SAMP_Class)="COMP") AND (([Pb206-p_ppm]/[Pb204-p_ppm])>[Enter Threshold]))
ORDER BY Header.Hole_NUM;