Question : combo box issue - Lookup

Experts, i have this nagging issue with designing a query.  I continually run into this issue of not being able to get the expected results when running a query for like: & * [enter co name] & * in qry design builder.  
The condition is on a cbo and has a lookup.

When I run the qry (without the condition mentioned) I see co names listed in the ds view.  If I want to run the qry for say any company with "me" in it it returns nothing.  

this is driving me nuts.  I have asked a similiar question to this
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26426278.html
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26358527.html


The issue is with this combo box lookup
I know the setup is in the combo box is:
--------------------------------------------------
bound column:  1
Column Widths: 0;1  (or just 0)
No of columns: 2

Basically, I am going to have to ask to have an expert fix this instead of going back and forth because I dont go anywhere with it.  

the db is pared down and only contains a qry and 2 tables.  
Please open the qry and you will see the condition.  
Anything else please let me know.  
Attachments:
 
qryTest
 

Answer : combo box issue - Lookup

You're having that issue because the field you performing the WHERE clause on is the foreign key from tblBanks, so the actual value is an number, not string. JOIN with the tblBanks table and apply the WHERE clause to the BankName field and the parameter query with like will work. See the attached SQL.
HTH,

MV
1:
2:
3:
4:
SELECT [Employees Extended].ID, [Employees Extended].[Employee Name], tblBanks.BankName
FROM [Employees Extended] INNER JOIN tblBanks ON [Employees Extended].BankID = tblBanks.BankID
WHERE (((tblBanks.BankName) Like "*" & [enter name] & "*"))
ORDER BY [Employees Extended].[Employee Name];
Random Solutions  
 
programming4us programming4us