DataTyp Problem

  • Thread starter Thread starter Benjamin
  • Start date Start date
B

Benjamin

Hi,


I have an string expression as an number,
(out of an DSum function)
for example 19000 and i want to convert this
string in an expression of type double.
When possible i would like to do this within
an querry.
Can anybody help me ?

Thx

Benjamin
 
Use Val() to get the Value of a string.
Val() cannot handle Null, so you need to use Nz() first.

The expression will end up as:
Val(Nz(DLookup(... , ... , ...),""))

Val() does return a double, but you can also use CDbl().

For more info on typecasting in queries, see:
Calculated fields misinterpreted
at:
http://members.iinet.net.au/~allenbrowne/ser-45.html
 
Back
Top