I'm declaring a variable in one form that I need to make available in a second form. My code in Form1 looks like this:
Public Sub FuncKeysModule(ByVal value As Keys) Select Case value Case Keys.F5 Dim searchtype As Integer If txbPartNo.Focused = True Then Popup_PartNumbers.Label1.Text = "Enter the beginning characters of the Part Number to search" searchtype = 1 End If If txbDesc.Focused = True Then Popup_PartNumbers.Label1.Text = "Enter a word from the Part Number Description to search" searchtype = 2 End If Popup_PartNumbers.ShowDialog() End Select End Sub
The variable "searchtype" (1 or 2) needs to be read in Form2 to run either one of two routines. How should this be written in Form1 and then how do I read it in Form2.
In advance, thanks for your help.