Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005

    Unanswered: Date covered by from / to date

    I'm really having a haggle here with Access, as I would solve this in a jiffy using SQL-Server.

    I have two fields in a record, a FROM date and a TO date.

    I need to do a query that checks if a given date (this case 31/12/05) is inside the range defined by the FROM date and TO date.

    How to do so in Access?

    SELECT dbo_Plademærkelinie.Plademærkenummer
    FROM dbo_Plademærkelinie
    WHERE (((#12/31/2005#) Between [dbo_Plademærkelinie].[Fra dato] And [dbo_Plademærkelinie].[Til dato]));
    Is an example of it...
    Last edited by Trinsan; 03-21-06 at 05:15.
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    that's exactly how you do it

    are you getting an error message or something? | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    The query looks fine, how are you using it - as a native jet query or in code as a ADO or DAO recordset?
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts