Solved

Getting a date

Posted on 1998-07-22
1
105 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
1 Comment
 
LVL 5

Accepted Solution

by:
yronnen earned 50 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now