Re: Expressions for parameters in query



Add a column to the query.
Field: LessThan4: Len(Fund) > 4
Criteria: Forms!frmSelectDateType!TxtType="Type1"

What this does is
--Calculates the Len of Fund being greater than 4 and returns True (or
False)
--Criteria returns True if "Type 1" is selected on the form or false
otherwise

So
if the Len(Fund) > 4 and type is "Type 1" (True = True evaluates to True)
only Fund with len > 4 are returned
if the Len(Fund) <= 4 and type is Not "Type 1" (False= False evaluates to
True) only Fund with len <= 4 are returned


"Karen" <Karen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:93E40110-1BE9-4BF8-B22B-26AE6A33389B@xxxxxxxxxxxxxxxx
Hi,
I have created a form to pass parameters to a query. The first parameter
is
the date range: Between [Forms]![frmSelectDateType]![BeginningDate] And
[Forms]![frmSelectDateType]![EndDate]. The next parameter I have on the
form
is a combo box with two values, Type 1 and Type 2. If the user selects
"Type
1", I need the query to run Len([Fund])>4 as the criteria for the Fund
field.
If the user selects "Type 2", I need the query to run Len([Fund])<=4.

How can this expression be written?


.



Relevant Pages

  • Re: Expressions for parameters in query
    ... Yes, since I did not know the name of your control, I made up a name for the ... I ran the query to check and it does not pull the information based ... column I created called LessThan4. ... --Calculates the Len of Fund being greater than 4 and returns True (or ...
    (microsoft.public.access.queries)
  • Re: Code Efficiency Suggestions
    ... the fund on the actual line of the fund number. ... Create another query and select tmpParsedInputData in the Show table ... > Append query and select your target table as the table to append to. ...
    (microsoft.public.excel.programming)
  • Re: Excel web querying stock and mutual fund info?
    ... I want excel to act like a fund screener. ... ratio, beta, alpha, 1 year, 3 year and 5 year returns. ... for "Query for data from a Web page." ... One of the best ways to do record the syntax of a web query is to use ...
    (microsoft.public.excel.programming)
  • Re: Moving data in a row to a column
    ... create a crosstab query (query object section, click on "new" button, choose ... Crosstab query - put the names as row headings, the fund as column headings ... and the SUM of Amount as the data), ...
    (microsoft.public.access.reports)
  • Re: Unable to have multiple queries feeding a single report
    ... I was mis-reading your query names as field names. ... 250 pieces of information about a single fund seems like a lot. ... > some calculations related to the scoring for each fund. ... >>> For a report I have in Access 2003, I have apparently tried to have too ...
    (microsoft.public.access.reports)