method differences

  • Thread starter Thread starter Marco
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top