Saltar al contenido principal

Búsqueda

Búsqueda

VBScript - Cannot add values?

Comentarios

2 comentarios

  • Avatar
    Peter Thane

    Although the values are numeric the VB is thinking they are text and so is concatenating the fields together. If you add CInt(......) to both strings then that will then work

    ie Value = CInt(Format.NamedSubStrings("TotalOrder").Value) + CInt(Field....<etc>....)

    0
  • Avatar
    Patryk Gawrysiak

    Thanks Peter Thane, 

    I used your method and ran into an overflow error, however I fixed it by using 'CLng' instead of 'CInt'

    Thanks Again.

    0

Iniciar sesión para dejar un comentario.