> I have a complex search query that works of several input fields on a form.
>
[quoted text clipped - 23 lines]
>
> Thanks for your time.
I put that in the criteria field for the datecreated column without the
(nzdst) as the database doesn't care if it is daylight saving or not.
It didn't work.
I spent a few more hours trying to get the query to work and ended up making
a real mess of the query. Had to restore from a backup file (mage the day
before) due to the complexity of this query 9this problem is on only part of
a multi-field search form).
> > I have a complex search query that works of several input fields on a form.
> >
[quoted text clipped - 28 lines]
> WHERE
> Year(nzdst) = Year([Forms]![artsearchkeyword]![yearsearch])
Krazy Darcy - 24 Feb 2007 07:39 GMT
I got it working now
year([datecreated])=[Forms]![artsearchkeyword]![yearsearch]
where datecreated is the field name
[Forms]![artsearchkeyword]![yearsearch] is the "path" to the input form text
box
I simply remaned the column datecreated from year and replaced each
occurance of [Forms]![artsearchkeyword]![yearsearch] with
year([datecreated])=[Forms]![artsearchkeyword]![yearsearch]
I didn't have to touch the Is Null column
For some reason the query only works when run from the form but not directly
(when run directly I get asked for the values but it returns zero results) -
not the end of the world
> I put that in the criteria field for the datecreated column without the
> (nzdst) as the database doesn't care if it is daylight saving or not.
[quoted text clipped - 40 lines]
> > WHERE
> > Year(nzdst) = Year([Forms]![artsearchkeyword]![yearsearch])
Smartin - 28 Feb 2007 23:59 GMT
> I got it working now
>
[quoted text clipped - 12 lines]
> (when run directly I get asked for the values but it returns zero results) -
> not the end of the world
Glad you got it working.

Signature
Smartin