Re: help using a parameter in an 'In (...)' criteria
- From: Jey <Jey@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Jan 2009 10:50:09 -0800
Hi,
OK, I got it to work. Thanks!
I don't understand why my three other parameters are in square brackets in
the WHERE clause, but for the survey list parameter it's the field name that
is in square brackets? Hmm, now that I look at the SQL more closely I also
don't understand why in the SELECT clause the table/field are as
[Table]![Field] but in the WHERE they are as (Table.Field). Are those two
formats interchangeable? maybe that's where my confusion is coming from?
Here is my SQL:
PARAMETERS parSurveyList Text ( 255 ), parHerd Long, parPreDate DateTime,
parPostDate DateTime;
SELECT Sum([GroupLocation]![AdultUnknown]+[GroupLocation]![Unknown]) AS
[Unknown]
FROM Survey INNER JOIN GroupLocation ON Survey.Survey_ID =
GroupLocation.Survey_ID
WHERE (((GroupLocation.Herd_ID)=[parHerd]) AND ((InStr("," & parSurveyList &
",","," & [SurveyType] & ","))>0) AND ((GroupLocation.Date)>[parPreDate] And
(GroupLocation.Date)<[parPostDate]));
.
- References:
- help using a parameter in an 'In (...)' criteria
- From: Jey
- Re: help using a parameter in an 'In (...)' criteria
- From: MGFoster
- Re: help using a parameter in an 'In (...)' criteria
- From: Jey
- Re: help using a parameter in an 'In (...)' criteria
- From: MGFoster
- Re: help using a parameter in an 'In (...)' criteria
- From: Jey
- Re: help using a parameter in an 'In (...)' criteria
- From: MGFoster
- help using a parameter in an 'In (...)' criteria
- Prev by Date: Re: Recurring Names
- Next by Date: Setting average across
- Previous by thread: Re: help using a parameter in an 'In (...)' criteria
- Next by thread: problems with counting and summing records in a query
- Index(es):
Relevant Pages
|