William Benson (VBACreations.Com)
vbacreations at gmail.com
Wed Jul 6 07:50:05 CDT 2011
Dear Colleagues, The below expression works when the display control for the field is a listbox, and the above expression its row source. But it won't work (as written) when the display control is a textbox and the expression is the Default Value -- getting syntax error. Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, Tbl_Field_Values.WS, Tbl_Field_Values.FLD; Table: Tbl_Field_Values_Header Field: SumOfItems Can the syntax be improved to cause the sum of all items where WB, WS, and FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display as the default value in the field I am trying to populate (SumOfItems) in my Tbl_Field_Values_Header table?