Aller au contenu principal

Recherche

Recherche

Multiply a database field by a set value

Commentaires

2 commentaires

  • Avatar
    Peter Thane

    Create your sum field on the label and make it a VB Script and an Event Controlled Script and then click the Edit with.... button.

    On the Autoselected Events screen amend the editor box to Value = "1" so that you have a dummy value showing on your label and then from the column on the left select the OnNewRecord option.

    In the editor box type in Value = and then in the Script Assistant box on the right scroll down to the Database Fields section and from there double click on the field you wish to multiply.

    The editor box should now show something like 

    Value = Field.......

    On a new line type

    Value = Value * 

    and then add the type the multiplier to that command (ie Value = Value * 7) and you are done 

     

     

    0
  • Avatar
    Rafael Seward

    That worked perfectly. Thank you!

    I do have another question pertaining to this subject-

    Sometimes the value that shows up is a text, which cannot be multiplied. How can I tell that same script to copy the text and paste it in the new object field?

     

    0

Vous devez vous connecter pour laisser un commentaire.