Clearing Data Entry After Format.CancelPrint 追蹤

Christopher Tague

In Print station, a label i have created requires user input from a barcode scanner. The user scans the barcode and the label is printed, as well as encoding the tag in SGTIN-96 format.

I'm trying to add data validation to the data entry field, in case they scan the wrong barcode. I have added a simpe VB script to the linked data source which is: 

If Left(Value, 2) <> "01" Then
Call Format.CancelPrinting("Invalid barcode.")
End If

The data validation works, but it gives me a popup that says, return to Data Entry Screen, or Cancel.

Two main issues i have, one is that when returning to the Data Entry Screen, the old value is still there. How do i clear it?

The second is that, i don't want the user to be able to Cancel. So basically i need a message that says "invalid barcode",  user presses OK, and goes back to empty data entry field.

Also, whenever the CancelPrint dialog is shown, the data entry form is minimized, and i see the Windows Desktop, very ugly.





1 意見

Pete Thane
評論操作 永久連結


Although you can get rid of the Cancel option (by amending the options for error message 1901, from Application Message Setup menu item in the Administer menu in BarTender Designer), I do not think you can clear the erroneous data automatically.

I have tried various options but couldn't get any of them to work and the best thing I could find would be to add the Clear Data button from the Properties of the Data Entry form and so perhaps you could change the error message to "Invalid barcode, press the Clear Data button to continue" or something similar.

Sorry, probably not what you are looking for