Re: Expressions for parameters in query
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Mon, 7 Aug 2006 12:51:46 -0400
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?
.
- Prev by Date: Slow Query
- Next by Date: Re: access date query
- Previous by thread: Slow Query
- Next by thread: Re: Expressions for parameters in query
- Index(es):
Relevant Pages
|