Results 1 to 2 of 2

Thread: Search between dates...............

  1. #1

    Thread Starter
    Fanatic Member spud's Avatar
    Join Date
    Aug 2000
    Location
    Munster (Germany)
    Posts
    542

    Search between dates...............

    I have a Access database attached to my Vb prog it has names and dates of when people are off work and the date they come back to work.

    I have the SQL to search the name and the date when they go off work but I wouldnt know where to start to show if they are off work between that date and the date they return from holiday.


    Any one any Idea how I do this?


    thx
    Haven't got anything to say that is the least bit interesting.
    www.tartan-underground.com

  2. #2
    Member
    Join Date
    Dec 2002
    Posts
    54
    Have you tried an Oledbparameter? This is the easiest way for me to search between dates:

    ' SQL Stmt
    SELECT Date1, Date2 'Include the rest of you column names
    WHERE ([Date1] <= ?) AND ([Date2 >= ?]) 'this established a parameter
    FROM TableName

    Then assign your parameter to the value of your object. (txtbx, dateTimePicker, ect.).

Posting Permissions

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



Click Here to Expand Forum to Full Width