Skip to main content

Search

Search

Data Entry Form Confirm Field

Comments

1 comment

  • Avatar
    Peter Thane

    Hi James,

    Not sure how to create an error other than if we send a Print zero labels command.

    For the code below I have linked the number of Copies on the File>Print screen to a NoofLabs field I have added onto the label (can be off to the side so it does not print). 

    Field1Entry and Field2Entry are the names I have set for the 2 data sources to be compared.

    NoofLabs is setup as VB>Event Controlled>OnIdenticalCopies script routine as follows

    ------

    Value = 1

    If Format.NamedSubStrings("Field2Entry").Value = Format.NamedSubStrings("Field1Entry").Value then
    Value = 0
    Else Value = 1

    End if

    Value = Value

    ------

    This assumes the number of label required is always 1 but if it is different you can add that value in a new field and give that a name and then replace Else Value = 1 with 

    Else Value = <the name of your field> (chosen by double clicking on it in the column in the right of the scripting window).

     

    I hope this makes sense

    Pete

    0

Please sign in to leave a comment.