This part may mislead you:
ssql = "select [AgencyCode] from tableimport"
CurrentDb.Execute ssql
"" (INSERT, DELETE, UPDATE SELECT INTO). Execute (SELECT), , # 3065, " ". , SELECT - . SELECT, SQL View .
[AgencyCode]... . ?
, INSERT , . :
insert into accounts_changes
select *
from Accounts
where [Agency Code] in (
select [Agency Code] from tableimport)
, , account_changes. , , @pcent.