using string function in queries

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DP

    using string function in queries

    I am trying to use the string or string$ (I don't know the difference)
    function to convert a number to string, but I do not know what the obligatory
    arguments 2nd & 3d stand for.

    Thanks for your Help,
  • Peter Russell

    #2
    Re: using string function in queries

    Firstly, where are you getting a 'string()' function with 3 arguments
    from? In my copy of Access it only has 2.

    Secondly, it's not the function you need.

    if x = 116 then
    CStr(x) = "116"


    Regards

    Peter Russell




    DP previously wrote:
    [color=blue]
    > I am trying to use the string or string$ (I don't know the difference)
    > function to convert a number to string, but I do not know what the
    > obligatory
    > arguments 2nd & 3d stand for.
    >
    > Thanks for your Help,
    >[/color]

    Comment

    • paii

      #3
      Re: using string function in queries

      The $ after a function name will guarantee a "string" return.

      Try using the CSTR() function to convert from number to string

      Use the expression builder for an easy way to find and use functions.

      1) In the left window click on built-in functions
      2) In the middle window click on type of function
      3) In the right window click on a function type
      4) Click on the "HELP" button in the expression builder dialog
      This will bring up help on the selected function.
      Pressing "F1" will bring up help on expression builder.

      "DP" <dplevria@hol.g r> wrote in message
      news:1af1d3fb.0 309090403.2dd51 c48@posting.goo gle.com...[color=blue]
      > I am trying to use the string or string$ (I don't know the difference)
      > function to convert a number to string, but I do not know what the[/color]
      obligatory[color=blue]
      > arguments 2nd & 3d stand for.
      >
      > Thanks for your Help,[/color]


      Comment

      • DP

        #4
        Re: using string function in queries

        I am getting a string() function with 3 arguments from inside the expression
        Builder (i.e.use the wizard to buid an expression when in a query); first
        argument is a number and the other two are strings
        Thank you, CStr() was the clue




        prussell@russel lscott.co.uk (Peter Russell) wrote in message news:<memo.2003 0909143954.704F @russellscott.b tinternet.com>. ..[color=blue]
        > Firstly, where are you getting a 'string()' function with 3 arguments
        > from? In my copy of Access it only has 2.
        >
        > Secondly, it's not the function you need.
        >
        > if x = 116 then
        > CStr(x) = "116"
        >
        >
        > Regards
        >
        > Peter Russell
        >
        >
        >
        >
        > DP previously wrote:
        >[color=green]
        > > I am trying to use the string or string$ (I don't know the difference)
        > > function to convert a number to string, but I do not know what the
        > > obligatory
        > > arguments 2nd & 3d stand for.
        > >
        > > Thanks for your Help,
        > >[/color][/color]

        Comment

        Working...