Hi everyone,
I have a basic query that references a form's value in the WHERE clause. I'd like to try and turn this query into a pass-through query as I'm looking at moving my tables to an online SQL server. I'm aware that pass-through queries cannot utilise form values in the traditional way but I can't seem to figure out the way around this issue.
The current query is:
I then have a sub from populate based off of this query to display associated contacts with the individual company (parent form).
My question: How do I get a pass-through query to work like this? How do I replace (((TbleCompany.[ID])=[Forms]![FrmCompany]![ID])); with something that the pass-through SQL query can work with once the tables are server side?
Thanks very much
I have a basic query that references a form's value in the WHERE clause. I'd like to try and turn this query into a pass-through query as I'm looking at moving my tables to an online SQL server. I'm aware that pass-through queries cannot utilise form values in the traditional way but I can't seem to figure out the way around this issue.
The current query is:
Code:
SELECT Company.[Company Name], Contacts.[First Name], Contacts.[Last Name], Contacts.[E-mail Address], Contacts.[Job Title], Contacts.Telephone
FROM Company INNER JOIN Contacts ON Company.ID = Contacts.[Company ID]
WHERE (((TbleCompany.[ID])=[Forms]![FrmCompany]![ID]));
I then have a sub from populate based off of this query to display associated contacts with the individual company (parent form).
My question: How do I get a pass-through query to work like this? How do I replace (((TbleCompany.[ID])=[Forms]![FrmCompany]![ID])); with something that the pass-through SQL query can work with once the tables are server side?
Thanks very much