If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Applications & Tools > Query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-04, 01:19
acqua acqua is offline
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old 01-22-04, 12:38
rami.haddad rami.haddad is offline
Registered User
 
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


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

Acqua
Reply With Quote
  #3 (permalink)  
Old 01-26-04, 03:42
acqua acqua is offline
Registered User
 
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
---------------------------------------------------

Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On