Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 1st, 2003, 02:58 PM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query with a date range... PLEASE HELP!

I am new to Access, and having some problems when querying date ranges from a database.

Here is my query:
SELECT Count(INPUTDATE) AS C_LastMonth
FROM QMortgage_ameriquest WHERE INPUTDATE >= '9/1/2003'

Here is the error I get:
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.

That Query works fine on an MS SQL Database, why does it not work in Access, and what will work?

Travis Cable
travis@bridgewebdesign.com
 
Old October 1st, 2003, 03:12 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First of all you need to use >=#9/1/2003# instead of '9/1/2003'. Also you need to use the following

SELECT Count(QMortgage_ameriquest.INPUTDATE) AS C_LastMonth
FROM QMortgage_ameriquest
WHERE (((QMortgage_ameriquest.INPUTDATE)>=#9/1/2003#));

This will get you the count for the complete table. Jet SQL requires that you use the tablename.fieldname syntax.

Sal
salintl@yahoo.com

 
Old October 1st, 2003, 03:41 PM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, that worked perfectly.

Travis Cable
travis@bridgewebdesign.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find a date range between another date rang tayvonne Access 2 August 3rd, 2006 09:50 AM
Date Range Flipflop SQL Language 6 November 25th, 2005 08:36 AM
date range query killroy Access 2 August 17th, 2005 02:14 PM
Help with Date Range PacMed Access 1 February 1st, 2005 12:30 PM
Date Range mrideout BOOK: Beginning ASP.NET 1.0 0 January 2nd, 2005 07:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.