Pop Up Box Not Displaying Info In Print Preview Follow

0
Avatar
Legacy Poster

Hello,

 

I am trying to have a pop up box be displayed at the start of a print job that shows info that is pulled from a database.

 

 

So far I have a query set up on the database so when you print, it asks for the item number to print, then after the query runs, a message box pops up. info is displayed and then you can either continue and print, or cancel it and the print job.

 

So the issue is, I want to be able to see what the label will look like before it is printed with the new information on the label, but when I do a print preview, the information in the pop up box will not be displayed.

 

Here's what I have so far:

ReferenceField("Cully Jar Database.Label Template #")
ReferenceField("Cully Jar Database.Note /Label PN")
ReferenceField("Cully Jar Database.Note/Color/Size")
ReferenceField("Cully Jar Database.Note/ Jar")
ReferenceField("Cully Jar Database.Note/ Lid")


LabelPn = MsgBox("Label Template: " + (Field("Label Template #")) & vbCrLf & _
+ Space(11) + "Label PN: " +(Field("Note /Label PN") & vbCrLf & _
+ Space(9) + "Color/Size: " + (Field("Note/Color/Size") & vbCrLf & _
+ Space(22)+ "Jar: " + (Field("Note/ Jar") & vbCrLf & _
+ Space(22)+ "Lid: " + (Field("Note/ Lid"))))) ,1,("Label Check"))

If LabelPn = 2 Then
Format.CancelPrinting("Print Job Cancelled") 
End If
 
 
 

 

 

 

 

Thank you.

5 comments

0
Avatar
Fernando Ramos Miracle
Moderator
Comment actions Permalink

1. What exactly do you mean as the "Information on the pop up box"? Are you referring to the Data Entry Form? Being this the case, the problem is that the information entered on the Data Entry Form is not being previewed correctly after clicking on the "Preview" button?

 

2. On what event are you entering the above code? Note that if you are using an event based VB Script, anything happening on the "OnPostPrompt" event or later cannot be previewed.

 

3. Also note that you can add a label preview on the actual Data Entry Form using an "Picture Control" and setting the picture source as "Preview of Printed Item" (on the "Picture" node of the picture control's properties dialog).

 

Cheers.

0
Avatar
Legacy Poster
Comment actions Permalink

Thank you for the reply

 

I seemed to have figured out the issue. The template gets disconnected from the database whenever it can't find the item number you enter in the query. So none of the information in the message box would appear if it was disconnected, but when it is connected, the information would appear during a print preview. 

 

The VB script is set to run OnPrintJobStart. It creates a pop up message after a part number is entered into the query.

 

And thank you on how to add the print preview to the Data Entry form, that would be very useful to what I am trying to do.

 

Thank you.

0
Avatar
Legacy Poster
Comment actions Permalink

Also, is there any way to have that VB Script be displayed in the data entry form?

 

Thanks.

0
Avatar
Fernando Ramos Miracle
Moderator
Comment actions Permalink

Can I understand that you wish to be able to see the actual script on the "Data Entry Form" so it's visible whenever you send a print job?

 

If this is what you require, you could use a "Text" control object and copy-paste the actual script on that object. This way you would transform the actual script to static data to be displayed on the "Data Entry Form".

 

If you wish to dynamically see the actual script on the "Data Entry Form" I'm afraid that this is not possible.

0
Avatar
Legacy Poster
Comment actions Permalink

I would want see the script dynamically, but seeing as that is not possible, I will just resort to another method of displaying the information. 
 

Thank you for your help.

Please sign in to leave a comment.