Solved

Getting a date

Posted on 1998-07-22
1
120 Views
Last Modified: 2010-05-03
VB5
I have Access database linked table to Excel
And field called date, datatype date ( d,mmm)
it is like written in column  8-jul
Script in VB5
"Select Sum(amount) from TableA Where date between '01-Jul' and '30-Jul'"
fails  
Error message 3464 date dype mismatch
Please help to write correct script
Thanks
Matt

0
Comment
Question by:mativare
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
yronnen earned 50 total points
ID: 1466475
You should write it like that:
"Select Sum(amount) from TableA Where date between #01-Jul# and #30-Jul#"

Besides, it's better to convert the dates to mm/dd/yyyy. This will assure that you'll have no problems in the SQL
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question