Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unexplainable data type mismatch

Status
Not open for further replies.

RemyS

Technical User
Jul 3, 2001
100
GB
I have been running a query for months now without any problems. Now all of a sudden it doesn't work.

The query is an INSERT INTO and converts a string into a Double number CDbl(Mid([Table1].[Field1],6,12)) AS Amount
The Field in the Table that it appends to is Double Number type.

As I mentioned it has been working fine up til now.

I can replace the CDbl with Val, but for some reason it misses all zeros after a comma, but I can't tell what it would do if there were any hundreds after the comma.


Has any one experienced this before, or know of some checks/fixes that I can apply.

All help appreciated
Remy 101 ways to do it with VB, and learning new ways every day.
 
ELABORATION OF PROBLEM

The query also calculates the Totals, so the full expression is Sum(CDbl(Mid([Table1].[Field1],6,12))) AS Amount

I've tried a little more testing and discovered that the Totals seemed to be part of the problem.

I still don't understand why this should be happening now, after all this time. 101 ways to do it with VB, and learning new ways every day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top