VB Scipt Error
If Format.Objects("Number Input Box 1").Value="1" Then
Format.Objects("Text 18").Value = "15:00"
End If
If Format.Objects("Number Input Box 1").Value="2" Then
Format.Objects("Text 18").Value = "01:00"
End If
If Format.Objects("Number Input Box 1").Value="3" Then
Format.Objects("Text 18").Value = "09:00"
End If
If Format.Objects("Number Input Box 1").Value="4" Then
Format.Objects("Text 18").Value = "12:00"
End If
When i test script in output show "Procedures for All Events (Line 0): Object required: 'Format'"
How to fix the coding error?
-
Peter Thane
★ BarTender Hero ★
I would suggest you make Text Field 18 a VB>Event Controlled>OnPostPrompt script object and add the VB to there. You would need to edit the second line of each pair from Format.Objects("Text 18").Value = ...." to Value = ....
0 -
Devandri Suherman
★ BarTender Hero ★
Thank you for the answer. It works to my coding.
0 -
Peter Thane
★ BarTender Hero ★
You cant link the VB to an input from a Data Entry box. You need to use the data in the field that the entry box is connected to.
In the image below field 1234 is link to the Number Input Box on the Data Entry Form and for ease of connection I have also Named this field TheInput.
The Empty field is the field that contains the VB script and is set as an Event Controlled Script > OnPostPrompt so that is will run after the data has been entered at print time on the form.
I just modified your code to link to TheInput rather than then Number Input Box
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
3 commentaires