Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Red face Unanswered: adding numeric value to string value

    I have a table that contains a string value. This value is actually numeric, eg 001234, but it needs to keep the double 0 in the front. how do I add 1 to the value so that it still keeps the double 0 in the front?
    eg 001234 + 1 = 001235

    thanks in advance
    ActionAnt

  2. #2
    Join Date
    Feb 2004
    Posts
    199
    yourfield=format(cint(yourfield)+1,"000000")
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    Originally posted by Kakha
    yourfield=format(cint(yourfield)+1,"000000")
    excellent thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •