I am a novice so please be patient. Simple problem but can not figure it out:
My code is:
'DoCmd.OpenQuery "Sum_of_Cases_for_each_Bol_Line", acViewNormal, acEdit
'DoCmd.GoToRecord acDataQuery, "Sum_of_Cases_for_each_Bol_Line", acGoTo, 1
total_no_order = Sum_of_cases_for_each_Bol_line.[# cases] ***
(What I want to do is find the field [# of cases] on the queries record and move it to a variable field to be accumulated) and then move to the next record in the query . I'm sure this is something stupid and all I need is the syntax or how i should declare the variable so it is acceptable to the compiler.