Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

CDbl Function

Discussion in 'Information Technology' started by wnfisba, Jul 28, 2006.

Tags:
  1. wnfisba

    wnfisba
    Expand Collapse
    Guest

    I did a search on "CDbl" and have seen where it is used in terms of data
    manipulation. Can anyone provide me a link as to what exactly it does???

    Thanks in advance.

    wnfisba
     
  2. Loading...


  3. RuralGuy

    RuralGuy
    Expand Collapse
    Guest

    On Wed, 31 May 2006 11:30:02 -0700, wnfisba <wnfisba@discussions.microsoft.com>
    wrote:

    >I did a search on "CDbl" and have seen where it is used in terms of data
    >manipulation. Can anyone provide me a link as to what exactly it does???
    >
    >Thanks in advance.
    >
    >wnfisba


    Look in VBA help under Functions (C)
    _______________________________________________
    hth - RuralGuy (RG for short)
    Please post to the NewsGroup so all may benefit.
     
  4. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    CDbl mean Convert to Double Type

    If you have a table with text fields [DaysOff] [DaysWorked], [Wageperday]
    and the [DaysOff] and [Daysworked] were text you could use CDbl like this
    EG.
    DaysIn:CDbl([DaysWorked]) DaysOut:CDbl([DaysOff])
    Earnings: (([DaysIn]-[DaysOut])*[Wageperday]))

    Or you could simple combine these two into a single formula or many other
    ideas.

    You can use CDbl to convert text fields with numeric text - like "5.45".
    This is used when (for example) you bring a table into access and it does not
    recognise the field as a number or if you extract a section of a field as
    text, etc.

    So
    CDbl("5.45") which is the numeric text would = 5.45 which IS a number and
    can be used in numeric forumlas.

    BUT
    CDbl("five point four five") will result in a Data Type Mismatch Error

    OK I know these are daft examples but I hope it helps you along the right path


    --
    Wayne



    "wnfisba" wrote:

    > I did a search on "CDbl" and have seen where it is used in terms of data
    > manipulation. Can anyone provide me a link as to what exactly it does???
    >
    > Thanks in advance.
    >
    > wnfisba
     

Share This Page