Re: Follow-up : Parameters using 'Between Date 1 & Date 2' - Need to use 'Like' too!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kahuna (none_at_gonewest.com)
Date: 03/11/04


Date: Thu, 11 Mar 2004 08:53:58 -0000

Thanks MG, that might just do it. I'll play with it this pm.

Cheers

-- 
Kahuna
------------
"MGFoster" <me@privacy.com> wrote in message
news:1pM3c.13575$%06.5071@newsread2.news.pas.earthlink.net...
> Kahuna wrote:
>
> > As a follow-up I have tried using the following code
> >
> > Between (([tblAnom_Register].[anom_date_raised]) Like IIf(IsNull([Enter
> > First Possible Date Raised]),"*",[Enter First Possible Date Raised]))
And
> > (([tblAnom_Register].[anom_date_raised]) Like IIf(IsNull([Enter Second
> > Possible Date Raised]),"*",[Enter Second Possible Date Raised]))
> >
> > Though the syntax seems to be correct the query returns no records with
> > theithr blank parameters entered or qualified dates.
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> You could probably try using the Nz() function.  E.g.:
>
> Syntax:  Nz(test value, substitute value)
>
> If the "test value" is NULL then the "substitute value" is used.
>
> SQL WHERE clause:
>
> WHERE tblAnom_Register.anom_date_raised BETWEEN Nz([Enter First Date
> Raised], #1/1/100#) And Nz([Enter Second Possible Date Raised],
> #1/1/9999#)
>
> If the user doesn't enter a date the default dates are substituted.  I
> used the highest & lowest default date values that can be stored in an
> Access db.  Therefore, if the user doesn't enter any dates in the
> parameter prompts, all records should be shown.
>
> Caveat:  Any anom_date_raised that is NULL will not be selected.
>
> HTH,
>
> - --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP for Personal Privacy 5.0
> Charset: noconv
>
> iQA/AwUBQE+SvoechKqOuFEgEQJXawCg71bUANdieBz/ZNQrzwzidc6b2xwAmwR6
> KDZhWNUIUe0ZKqBtul/sLA7q
> =oDhM
> -----END PGP SIGNATURE-----
>


Relevant Pages

  • Re: Conversion from int to char
    ... Gary Scott wrote: ... It's an abstract concept...the character variable is a substitute for a ... that while they might then be able to find the syntax, ... There's a lot of different io in fortran. ...
    (comp.lang.fortran)
  • Re: Conversion from int to char
    ... It's an abstract concept...the character variable is a substitute for a ... I don't quite follow execution here. ... that while they might then be able to find the syntax, ... you want them to think of it as internal I/O ...
    (comp.lang.fortran)
  • substituting (was Re: Gay lisp)
    ... first on the American ... i've been exploring the syntax of the verb ... "substitute" ... second object in "for", it's NEW...OLD, but with a second object in ...
    (sci.lang)
  • Re: Follow-up : Parameters using Between Date 1 & Date 2 - Need to use Like too!
    ... Hash: SHA1 ... Syntax: Nz(test value, substitute value) ...
    (microsoft.public.access.queries)
  • Re: regular expression
    ... And the while loop just means "substitute as long as ... I believe the OP's problem with the "1 while" syntax and not with the ... As a side note for Perl documentation writers, ... mentioned at all on the CPAN site on the "Perl Syntax" page here: ...
    (comp.lang.perl.misc)