Zum Hauptinhalt gehen

Suche

Suche

VBScript - Cannot add values?

Kommentare

2 Kommentare

  • 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

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.