Zum Hauptinhalt gehen

Suche

Suche

VB Scripting

Kommentare

3 Kommentare

  • Avatar
    Peter Thane

    Have you tried making Text Box 40 a VB Event Controlled Script and adding your command to the appropriate event, such as if the data comes from a Database then OnNewRecord or from a Data Entry field OnPostPrompt or else OnIdenticalCopies is normally a good catch all when to process a script that is relating to a data field.

    Not sure on the 2nd query. VB Script is a cut down version of the regular VB and so you restricted to the limitations of that. On a personal level I very rarely use the Document Level Scripts but mainly use scripting inside the data fields themselves, for no other reason than that is how I have been doing it for years. May not be the best way but I can normally get it work as I/my customers need, and so not looked at doing things differently, but then I am also not a VB programmer and I am self taught whilst configuring more complex BarTender labels.   

    0
  • Avatar
    Graham Perry

    Hm, I did not realize you could make them into event-controlled fields so that you only had to run the script on the specific element, that is helpful.  I did get it to work because, when I put in OnNewRecord in the textbox itself as I did originally it still returned that it cannot write a readonly value.  But if I did instead only

    Value = RegulationFilter(Field("data.data.Year"))

    then it worked.  I am curious if you know why Format.Objects("object name").Value is readonly but Value itself is not, but regardless - thank you very much for your help!

    0
  • Avatar
    JOHN COSBY

    I've seen the same behavior when trying to change a value from outside of its context. Naming the data source for the value to be changed seems to solve the problem.

    0

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