Access 2000

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin

    Access 2000

    I am trying to build a query that contains a simple Access 2000
    database for recording vacation/sick time.

    For example I have a table with StartDate and EndDate that contains
    the obvious: Start Date and End Date for the dates of Vacation or Sick
    time they are off. I was wondering if there was an easy way to build
    a macro or query that tells me if that person is not in the office
    that day?

    Any thuoght would be greatly appreciated!
  • Pavel Romashkin

    #2
    Re: Access 2000

    SELECT FirstName, LastName FROM DataTable WHERE (Now() > EndDate OR
    Now() < StartDate)

    Cheers,
    Pavel

    Kevin wrote:[color=blue]
    >
    > I am trying to build a query that contains a simple Access 2000
    > database for recording vacation/sick time.
    >
    > For example I have a table with StartDate and EndDate that contains
    > the obvious: Start Date and End Date for the dates of Vacation or Sick
    > time they are off. I was wondering if there was an easy way to build
    > a macro or query that tells me if that person is not in the office
    > that day?
    >
    > Any thuoght would be greatly appreciated![/color]

    Comment

    • CDB

      #3
      Re: Access 2000

      Perhaps more reliably:

      SELECT FirstName, LastName FROM DataTable WHERE (Date() => [StartDate] AND
      Date() =< [EndDate]);

      or:

      SELECT FirstName, LastName FROM DataTable WHERE ([SpecifiedDate] BETWEEN
      [StartDate] And [EndDate]);

      Both form assume that only a date is stored in the datetime field. There can
      be problems with stored dates that include a time component (as Now() does).

      Clive


      "Pavel Romashkin" <pavel_romashki n@hotmail.com> wrote in message
      news:401EB078.A 9A0D8E@hotmail. com...[color=blue]
      > SELECT FirstName, LastName FROM DataTable WHERE (Now() > EndDate OR
      > Now() < StartDate)
      >
      > Cheers,
      > Pavel
      >
      > Kevin wrote:[color=green]
      > >
      > > I am trying to build a query that contains a simple Access 2000
      > > database for recording vacation/sick time.
      > >
      > > For example I have a table with StartDate and EndDate that contains
      > > the obvious: Start Date and End Date for the dates of Vacation or Sick
      > > time they are off. I was wondering if there was an easy way to build
      > > a macro or query that tells me if that person is not in the office
      > > that day?
      > >
      > > Any thuoght would be greatly appreciated![/color][/color]


      Comment

      Working...