Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Combo Box Choices

Status
Not open for further replies.

dannyocean

Technical User
Jan 26, 2001
136
US
Hello All,

I have a combo box that I want to control the choices shown based upon the entry in a prior field.

I can get this to work where I do not have to use like and the field name.

Here is what I have
SELECT s_Markets.[Market Code], s_Markets.[Market Name]
FROM s_Markets
WHERE (((s_Markets.[Service Center Code]) Like "*[Service Center]*"))

The service center code field contains all service center codes that pertain to a market.
ex: [Market Code] = "SF' [Service Center Code] = CN, LO, WI.

So I am having trouble making the [Service Center] field equate to service center code.

Hope this makes sense.

TIA

Danny.
 
use this for your where....

WHERE (((s_Markets.[Service Center Code]) Like "*" & Me![Service Center] & "*"))

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Robert,

Thanks. Works great. One more question.

In a similar instance except that the service center is different from the entire string in service center code so I would like all choices to show.

Service Center = CP and Cp is not part of the string for service center code. So I would like it to treat CP as a wildcard byitself.

Thanks again
 
i don't follow you...can you provide a couple examples???

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top