Results 1 to 3 of 3

Thread: Query

  1. #1
    Join Date
    Jan 2004
    Posts
    4

    Thumbs up Query

    I want to get only records between 2 dates in the data report in visual basic

    Acqua

  2. #2
    Join Date
    Jan 2004
    Posts
    184

    Re: Query

    Do A search on the BETWEEN keyword and see if your provider accepts the keyword, if not try this: (the '#' are used for data values)

    strSQL="SELECT * FROM Table WHERE Date1>=#" & strDate1 & "# AND Date1<=#" & strDate1 & "#"

    Also try this control which has made my life easier:

    http://www.geocities.com/scirocco_ha/DataControl.htm


    Originally posted by acqua
    I want to get only records between 2 dates in the data report in visual basic

    Acqua

  3. #3
    Join Date
    Jan 2004
    Posts
    4

    Thumbs up Re: Query

    dear friend
    b4 applying this query i m failed to run the report
    by using connecting string.
    that is without data environment .
    i applied 2 or 3 methods but the error i got is wrong arguments....
    i m using ODBC access database.
    i simply try to run the report with out criteria but failed.
    in debug mode i passed the connection string, then
    then i open record set query then
    datareport.datasource= rs but when i asked to show the report
    i got the message.
    help me plz
    acqua
    ---------------------------------------------------

    Originally posted by rami.haddad
    Do A search on the BETWEEN keyword and see if your provider accepts the keyword, if not try this: (the '#' are used for data values)

    strSQL="SELECT * FROM Table WHERE Date1>=#" & strDate1 & "# AND Date1<=#" & strDate1 & "#"

    Also try this control which has made my life easier:

    http://www.geocities.com/scirocco_ha/DataControl.htm

Posting Permissions

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