Sample VB script code to Set the path to an image object dynamically - Support

Sample VB script code to Set the path to an image object dynamically

From Support

Jump to: navigation, search

Capture the value from the report to determine whether or not to print the image on the form


' If the decision field is equal to Y, then enter IF statement

If thisform.fields("Decision_Field").value = "Y" Then

 ' Sets the visiblity of the decision fill field to false
      ThisForm.Fields("Decision_Field").visible = false
	
 ' Activate the Image Fill Field
      ThisForm.Fields("Image_Field").activate

 ' Set the path to the image file
      ThisForm.Fields("Image_Field").value = "C:\FOLDER\FILE_NAME.EXT"

 Else 
		
 ' Sets the visiblity of the decision fill field to false
      ThisForm.Fields("Decision_Field").visible = false
		
 ' If the Decision fill field doens't meet the criterea, then don't print the image on the form
      ThisForm.Fields("Image_Field").Printable = false
	
 End If
Personal tools