Use a button to hyperlink to another form - InfoPath Dev
in

InfoPath Dev

Use a button to hyperlink to another form

Last post 09-17-2012 05:31 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-11-2012 11:10 AM

    Use a button to hyperlink to another form

    So I have a form. My end goal is to insert a button on this form that is attached to a hyperlink(It hyperlinks to the published loaction of another form).  Below is the visual studio code. I've looked online and tried a bunch of different things, but I'm not too familiar with this. Any idea what code snippet is needed? I cannot use the rule action to open a blank infopath form, as when I do it says the form is not from a trusted publisher,

     

    Imports Microsoft.Office.InfoPath

    Imports System

    Imports System.Windows.Forms

    Imports System.Xml

    Imports System.Xml.XPath

    Imports mshtml

     

    Namespace ProjectsFIN

    Public Class FormCode

    ' Member variables are not supported in browser-enabled forms.

    ' Instead, write and read these values from the FormState

    ' dictionary using code such as the following:

    '

    ' Private Property _memberVariable() As Object

    ' Get

    ' _memberVariable = FormState("_memberVariable")

    ' End Get

    ' Set

    ' FormState("_memberVariable") = value

    ' End Set

    ' End Property

    ' NOTE: The following procedure is required by Microsoft Office InfoPath.

    ' It can be modified using Microsoft Office InfoPath.

     

     

    Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup

    AddHandler DirectCast(EventManager.ControlEvents("CTRL105_7"), ButtonEvent).Clicked, AddressOf CTRL105_7_Clicked

    AddHandler DirectCast(EventManager.ControlEvents("CTRL106_7"), ButtonEvent).Clicked, AddressOf CTRL106_7_Clicked

    AddHandler DirectCast(EventManager.ControlEvents("CTRL108_7"), ButtonEvent).Clicked, AddressOf CTRL108_7_Clicked

    AddHandler DirectCast(EventManager.ControlEvents("CTRL109_7"), ButtonEvent).Clicked, AddressOf CTRL109_7_Clicked

    End Sub

     

     

     

     

    Public Sub CTRL105_7_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

     

     

     

     

    End Sub

    Public Sub CTRL106_7_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

     

    End Sub

    Public Sub CTRL108_7_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

     

     

    End Sub

    Public Sub CTRL109_7_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

    ' Write your code here.

    End Sub

    End Class

    End Namespace

  • 09-17-2012 05:31 PM In reply to

    Re: Use a button to hyperlink to another form

    Hi - I just see the clicked events for a bunch of buttons here - no actual code. Any reason you can't use the built in rule action to open another form - that is, is this a browser form? If it is a browser form - could you just include a hyperlink to the new form? I'm wondering if there is a way around using code for this for you.

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.