Infopath submit query to SQL advanced - need help
I need to submit my @Total_Amount and @Project_Cost_Centre fields into my SQL
query in the place of the £1000 and the 1510000 below. I then need to grab
the result of the query and submit the form to the email address signified by
Surname, First Name output from the query.
SELECT DISTINCT e.vchrFirst_Name, e.vchrSurname, ecc.vchrCost_Centre,
ac.vchrPersonal_Expenses
FROM tblEmployees e INNER JOIN
tblEmployee_Cost_Centre ecc ON e.vchrCost_Centre =
ecc.vchrCost_Centre INNER JOIN
tblAuthority_Codes ac ON e.vchrAuthority_Code =
ac.vchrAuthority_Code
WHERE (ac.vchrPersonal_Expenses = '£1,000' OR
ac.vchrPersonal_Expenses = '£1000') AND
(e.vchrCost_Centre = '1510000')
I want to replace the numbers with my fields but that doesn't seem the way.
Any ideas?
Can anyone who is particularly clever help me as this is way out of my depth.
Cheers Adam
|