Re: Filter By Selection

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Don Kline (Dkline001_at_comcast.net)
Date: 05/15/04


Date: Fri, 14 May 2004 21:35:56 -0400

Thank you! Mission accomplished!

"Gerald Stanley" <gcstanley@d-s-l.pipex.comREMOVE-> wrote in message
news:d41701c439ff$3dc9b710$a401280a@phx.gbl...
> If you are trying to apply a filter to the form's
> recordsource based upon the value of yourComboBox, then try
> DoCmd.ApplyFilter , "[Sub Manager Name]) = '" &
> yourComboBox & "'"
>
> Hope This Helps
> Gerald Stanley MCSD
> >-----Original Message-----
> >I need to run a "Filter By Selection" and I cannot get the
> syntax right.
> >
> >The SQL statement from the query is:
> >
> >SELECT [tbl_manager value by policy].[Sub Manager Name],
> [tbl_manager value
> >by policy].PolicyNumber, [tbl_manager value by
> policy].[Client Name],
> >[tbl_manager value by policy].Program, [tbl_manager value by
> >policy].[SumOfFinal Balance]
> >FROM [tbl_manager value by policy]
> >WHERE ((([tbl_manager value by policy].[Sub Manager
> Name])="Greenbacks"));
> >
> >That works just dandy.
> >
> >What I need to do is have the current value of a combobox
> become the WHERE.
> >
> >SO if the user then picks "Greenspan" I want to alter the
> Where to:
> >WHERE ((([tbl_manager value by policy].[Sub Manager
> Name])="Greenspan"))
> >
> >I've tried this on the premise that I can build the string
> but this blows up
> >Me.Filter = ((([tbl_manager value by policy].[Sub Manager
> Name]) =
> >"Greenbacks"))
> >
> >I get:
> >Run-time error '2465'
> >Microsoft Accesscan't find the file field 'l' referred to
> in your expression
> >
> >
> >.
> >


Quantcast