method differences

M

Marco

Which is it the difference between the two formulas in a query ?
(format Standard decimal places Auto) r:[field km]/([field hours]*24)
without CDbl
and
(format Standard decimal places Auto) r:[[field km]/(CDbl([field hours])*24)

thx
 
M

Michel Walsh

Hi,


You can get an integer overflow with the first one, mainly if [field
hours] is also an integer.

Hoping it may help,
Vanderghast, Access MVP
 
M

Marco

Hi
So Is it better with "CDbl" ?
My field are :
number double standard auto
date/time long time

thx

Michel Walsh said:
Hi,


You can get an integer overflow with the first one, mainly if [field
hours] is also an integer.

Hoping it may help,
Vanderghast, Access MVP


Marco said:
Which is it the difference between the two formulas in a query ?
(format Standard decimal places Auto) r:[field km]/([field hours]*24)
without CDbl
and
(format Standard decimal places Auto) r:[[field km]/(CDbl([field
hours])*24)

thx
 
M

Michel Walsh

Hi,


If the field is already a double, CDbl( fieldName ) won't produce anything
different.


Hoping it may help,
Vanderghast, Access MVP


Marco said:
Hi
So Is it better with "CDbl" ?
My field are :
number double standard auto
date/time long time

thx

Michel Walsh said:
Hi,


You can get an integer overflow with the first one, mainly if [field
hours] is also an integer.

Hoping it may help,
Vanderghast, Access MVP


Marco said:
Which is it the difference between the two formulas in a query ?
(format Standard decimal places Auto) r:[field km]/([field hours]*24)
without CDbl
and
(format Standard decimal places Auto) r:[[field km]/(CDbl([field
hours])*24)

thx
 
Top