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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding a decimal to a recordset

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
rs("myNumber")=rs("myNumber")+.2

If i put a whole number in place of .2, it works fine.
The field in the database is setup decimal, but when I use .2 I get a type mismatch error.

Any Ideas?
 
Try converting the whole number to a double before you submit it:

Dim myNumber

myNumber = cDbl(rs("mynumber") + 0.2) Mise Le Meas,

Mighty :)
 
Thanks for the tip; I had to tweak it a bit to get it to work though:
temp=cdbl(rs("myNumber"))
temp=temp+.2
rs("myNumber")=temp

Whatever works I guess...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top