Results 1 to 16 of 16

Thread: Listing Data between two Dates

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    33

    Re: Printing Data between two Dates

    Quote Originally Posted by GaryMazzone
    Some thing like this

    "Select fieldname,fieldname from tablename where fieldname Between #" & datepicker start date & "# And #" & datepicker end date & "#"

    I did assume you are using Access as a backend that is why the date values are inside pound signs
    Access is not doing any of the work, just retrieving data from my visual basic programming. When I try using that I get an error saying "Expected Case".

  2. #2

    Thread Starter
    Member
    Join Date
    Dec 2005
    Posts
    33

    Re: Printing Data between two Dates

    VB Code:
    1. startDate = DatePart("d", dtpStartDate)
    2. endDate = DatePart("d", dtpEndDate)
    3.  
    4.     Do Until startDate = endDate
    5.         While Not found And Not tblBooking.EOF
    6.             If tblBooking!Date = dtpStartDate Then
    7.                 found = True
    8.             Else
    9.                 tblBooking.MoveNext
    10.             End If
    11.         Wend
    12.     Loop

    I got this so far, but my program keeps crashing, any ideas why??

    Thanks you for everyone who's helping, i'm really stuck

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