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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Has anyone had any problems using list box in a form?

Status
Not open for further replies.

B555

Technical User
Feb 7, 2005
36
0
0
US
I want to use the Multi Select function in the list box for a filter in a query, But as soon as I select Simple or Extended my query comes back blank. If I leave it at None, I can select a value as use it in my filter to run a query. I know I have data in the table I am trying to query against. Does anyone have any Ideas? It seems so simple, I was thinking I was missing a setting or something. I am using Access 2007. Thanks for any advice
 
How are ya B555 . . .

Post a sample SQL of the query . . .

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Dhookom,
Thanks for your advice. I will give it a shot. It looks very promising. I will let you know how it goes. B555
 
TheAceMan1

I have a database that is user active. They Imput thier own data and update thier own tables. I have a field that they want to filter by whatever value they select in a multivalue list box accessed from a form. My problem is that They can only select one, or all of values. I use the "Like ([Forms]![SalesMgrForm]![StatusList])" in the filter of the access query. Here is the SQL of the qry:SELECT [Tbl LeadDetail].ID, [Tbl LeadDetail].[Lead Status], [Tbl LeadDetail].[Date called], [Tbl LeadDetail].[Lead Date], [Tbl LeadDetail].[Call Back Date], [Tbl LeadDetail].IMSalesRep, [Tbl LeadDetail].IMSalesMgr, [Tbl LeadDetail].[Lead Source], [Tbl LeadDetail].AccName, [Tbl LeadDetail].AccCity, [Tbl LeadDetail].AccAddress, [Tbl LeadDetail].AccSt, [Tbl LeadDetail].AccContact, [Tbl LeadDetail].[Decision Maker], [Tbl LeadDetail].AccPhone, [Tbl LeadDetail].Corpcd, [Tbl LeadDetail].Billtocd, [Tbl LeadDetail].[Ship Full Ld], [Tbl LeadDetail].[% OTRfreight], [Tbl LeadDetail].[% IM freght], [Tbl LeadDetail].LPW, [Tbl LeadDetail].LPM, [Tbl LeadDetail].Commodity, [Tbl LeadDetail].[Primary Ship1], [Tbl LeadDetail].[Primary Ship2], [Tbl LeadDetail].[Primary Ship3], [Tbl LeadDetail].[Primary Cn1], [Tbl LeadDetail].[Primary Cn2], [Tbl LeadDetail].[Primary Cn3], [Tbl LeadDetail].[Ship International], [Tbl LeadDetail].[International Dest1], [Tbl LeadDetail].[International Dest2], [Tbl LeadDetail].[International Dest3], [Tbl LeadDetail].[Email Address], [Tbl LeadDetail].[Interested in Sales call], [Tbl LeadDetail].[Sent Contact Info], [Tbl LeadDetail].[Won Business], [Tbl LeadDetail].[Loads Tenderd], [Tbl LeadDetail].[Spot Quotes], [Tbl LeadDetail].Notes
FROM [Tbl LeadDetail]
GROUP BY [Tbl LeadDetail].ID, [Tbl LeadDetail].[Lead Status], [Tbl LeadDetail].[Date called], [Tbl LeadDetail].[Lead Date], [Tbl LeadDetail].[Call Back Date], [Tbl LeadDetail].IMSalesRep, [Tbl LeadDetail].IMSalesMgr, [Tbl LeadDetail].[Lead Source], [Tbl LeadDetail].AccName, [Tbl LeadDetail].AccCity, [Tbl LeadDetail].AccAddress, [Tbl LeadDetail].AccSt, [Tbl LeadDetail].AccContact, [Tbl LeadDetail].[Decision Maker], [Tbl LeadDetail].AccPhone, [Tbl LeadDetail].Corpcd, [Tbl LeadDetail].Billtocd, [Tbl LeadDetail].[Ship Full Ld], [Tbl LeadDetail].[% OTRfreight], [Tbl LeadDetail].[% IM freght], [Tbl LeadDetail].LPW, [Tbl LeadDetail].LPM, [Tbl LeadDetail].Commodity, [Tbl LeadDetail].[Primary Ship1], [Tbl LeadDetail].[Primary Ship2], [Tbl LeadDetail].[Primary Ship3], [Tbl LeadDetail].[Primary Cn1], [Tbl LeadDetail].[Primary Cn2], [Tbl LeadDetail].[Primary Cn3], [Tbl LeadDetail].[Ship International], [Tbl LeadDetail].[International Dest1], [Tbl LeadDetail].[International Dest2], [Tbl LeadDetail].[International Dest3], [Tbl LeadDetail].[Email Address], [Tbl LeadDetail].[Interested in Sales call], [Tbl LeadDetail].[Sent Contact Info], [Tbl LeadDetail].[Won Business], [Tbl LeadDetail].[Loads Tenderd], [Tbl LeadDetail].[Spot Quotes], [Tbl LeadDetail].Notes
HAVING ((([Tbl LeadDetail].[Lead Status]) Like ([Forms]![SalesMgrForm]![StatusList])) AND (([Tbl LeadDetail].IMSalesMgr) Like [Forms]![SalesMgrForm]![ReportSalesMgr]));

Also thanks for the other two links, I found them very helpful
B555
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top