Do I need to change the variable to a number?
//Labor Codes FID 14 = technician, FID 17 = hours per tech
//Query FID 42= technician, FID 12 = quantity, FID 16 = Month, FID 9 = item
//_DBID_QSALESHISTORY, FID 22 = technician, FID 20 = GL date, FID 23 = actual quantity, FID 16 = category, FID 15 = description FID 25 = labor category
var text myquery= "{20.GTE.'"&[First of Month]&"'} AND {20.LTE.'"&[Last of Month]&"'} AND {22.CT.'"&[User to text]&"'} AND {25.EX.'Regular'}";
var text aquery= "{20.GTE.'"&[First of Month]&"'} AND {20.LTE.'"&[Last of Month]&"'} AND {22.CT.'"&[User to text]&"'} AND {25.EX.'Refrigeration'}";
SumValues(GetRecords($myquery,[_DBID_QSALESHISTORY]),23)+[Hours Adjustment]+
//If(([Refrigeration Rate])<1,
(SumValues(GetRecords($aquery,[_DBID_QSALESHISTORY]),23)+[Refrigeration Hours Adjustment])
------------------------------
Anne Martin
------------------------------