set pagesize 1000
break on off_code skip 1
compute sum label 'Sum of Off_code' of amount on bank
select off_code, pay_dt, che_dt, che_no, count_no, bank, sum(amount) from paymast where off_code in (3123402, 3123600, 3123500, 3123200, 3123103, 3123000, 3123300, 3123101,3123102) and pay_dt = '&pay_dt' and che_no is not null and count_no not in (41, 91, 92, 62, 70) and che_no not in (0) group by off_code, count_no, pay_dt, che_dt, che_no, bank
Can I know how to implement this in Ms Access, specially the first 3 lines.