HELP! trying to access based on date is access

Results 1 to 2 of 2

Thread: HELP! trying to access based on date is access

  1. #1
    Join Date
    Dec 1969

    Default HELP! trying to access based on date is access

    i am trying to retreive information from an access database based on the date range that a person enters in i am not getting an error message but the information that it is retreiving from the access database is not the correct date range that it should be retreiving. for instince their is a query that should have gotten 186 records but only counted 58 records the table in the access database is set as date/time the code for the section of the page fallows any help would be apreciated <BR><BR>agenttest=Request.Form("agent")<BR>month1= Request.Form("month1")<BR>day1=Request.Form("day1" )<BR>year1=Request.Form("year1")<BR>month2=Request .Form("month2")<BR>day2=Request.Form("day2")<BR>ye ar2=Request.Form("year2")<BR>begindate = cdate(month1+"/"+day1+"/"+year1)<BR>enddate = cdate(month2+"/"+day2+"/"+year2)<BR><BR> sqltxt="SELECT * from SAVES where (saves.DATECONFIRMED BETWEEN #"&begindate&"# AND #"&enddate&"#)"<BR> set check = Server.CreateObject("ADODB.Recordset")<BR> check.Open sqltxt,conn,1,3<BR> <BR> sqltxt="SELECT * from SAVES WHERE STATUS=3 and (saves.DATECONFIRMED BETWEEN #"&begindate&"# AND #"&enddate&"#)"<BR> set concheck = Server.CreateObject("ADODB.Recordset")<BR> concheck.Open sqltxt,conn,1,3<BR>response.write(check.RecordCoun t)<BR>response.write(concheck.recordcount)

  2. #2
    Join Date
    Dec 1969

    Default Crosspost. Already answered.<eop>


Posting Permissions

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