I am having the same problem except using a simple query such as
select top 10
FormattheName(client_table3.last_name, client_table3.first_name, client_table3.middle_name) as [Client Name],
client_table3.table3_id,
logTable_table5.actual_date,
logTable_table5.end_date,
table4.program_name,
table6.profile_name,
...