Access Query - Between Operator showing additional data

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sivakumar V via AccessMonster.com (forum_at_AccessMonster.com)
Date: 01/04/05


Date: Tue, 04 Jan 2005 12:31:41 GMT

I am using vb-access for my application. In one report i am using between operator in SQL to fetch data from access database.
 
the following is the query:
 
SQL = "Select * from tbl1 where unit =1 " _
          & " and utdt between #" & frmdt & "#" _
           & " and #" & todt & "#"
 
set sRs = dbCN.execute(sql)
 
if i am giving 31/12/2004 as from date and 1/1/2005 as to date working perfectly.
 
if i am giving 31/12/2004 and 2/1/2005 as a from and to date because of 2/1/2005 is a holiday the query fetching beyond the limit of "todate"
 
what is the solution ???

-- 
Message posted via http://www.accessmonster.com


Relevant Pages

  • Re: Using ADO Recordset for Source of Access Report in .MDB file
    ... What I have done that has worked well is to create a PassThru query in the ... access database and programmaticly change its Sql to return results needed ... from any of the Server objects (Views, Sproc's, raw SQL, etc). ... Can anyone point to an example of how to use ADO to source my report? ...
    (microsoft.public.access.reports)
  • Re: A question on SQL
    ... Say I have an Access database containing a table with the following fields ... What is the SQL statement to generate the following result: ... I would not *DO* this using a query; I'd do it using a Report. ... very nice subtotaling tools, optional display, etc. - you're talking about a ...
    (microsoft.public.access.queries)
  • ~~~~~~~~~~~~~ MS ACCESS ~~~~~~~~~~~~~
    ... accdbman ms access database query table ... age bracket ms access report ... buy ms access download full version ...
    (comp.mail.pine)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • Re: SCAN.EXE - McAfee AntiVirus Software
    ... > | of network computers and have only report summaries sent to be via ... > | Virus Scan Report File ... > | application RemoteProcessLaunch. ...
    (microsoft.public.security.virus)