Query needs to get data from selected item in combobox

jpl458

Well-known member
Local time
Today, 14:52
Joined
Mar 30, 2012
Messages
1,218
I Have a combobox the has a list of companies (SelectCallcb). I have the following SQL:

Code:
SELECT Suspects.[First Name], Suspects.[Last Name], Suspects.Title, Suspects.Address, Suspects.Company, Suspects.CallCompany, Suspects.City, Suspects.zip, Mastertbl3.callingnumber, Mastertbl3.calldate, Mastertbl3.starttime, Mastertbl3.ActionableFlag
FROM Mastertbl3 INNER JOIN Suspects ON Mastertbl3.companyname1 = Suspects.CallCompany
WHERE (((Suspects.CallCompany)=[Enter Call Company])
ORDER BY Mastertbl3.calldate;

In the where clause, the term [Enter Call Company], needs to be replaced with the company name that was selected in the combobox. Still new at this, tried to find but no joy.
 
try this:

SELECT Suspects.[First Name], ...
...
WHERE (((Suspects.CallCompany)=[Forms]![FormName]![CompanyComboName])
...
...
 
try this:

SELECT Suspects.[First Name], ...
...
WHERE (((Suspects.CallCompany)=[Forms]![FormName]![CompanyComboName])
...
...
Once I did the punctuation/special chars right, it worked great. Shoulda cut and pasted instead of eyeballing.

Thanks
 

Users who are viewing this thread

Back
Top Bottom