Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing information

Status
Not open for further replies.

brew2

Programmer
Joined
Apr 29, 2007
Messages
21
Location
US
Have used this successfully but in this case it does not work. I have data in one form to transfer to another. In the passing form is this code:
Code:
Public ReadOnly Property Action() As String
        Get
            Return sAction
        End Get
End Property 

Private Sub lvwDisplay_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lvwDisplay.Click
        lngID = CInt(lvwDisplay.SelectedItems(0).Text)
        sAction = "D"
        Me.Hide()
        mdiMain.Show()
End Sub
In the receiving form is:
Code:
Select Case frmAllView.Action
            Case Is = "D"
                If frmAllView.lvwDisplay.Items.Count = 0 Then
                    Exit Sub
                Else
                    lngID = CInt(frmAllView.lvwDisplay.SelectedItems(0).Text)
                    dataMgr.FindOneName(lngID, mMember, mAttend)
                    FillBoxes()
                End If
            Case Is = "X"
                MsgBox("X")
End Select
After code returns to the receiving form, saction is 'nothing' which is perplexing. Of course, if sAction is nothing then the Select Case is bypassed.

Any ideas would be great. thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top