Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27091

VS 2010 Return value from frmLogin to frmMain

$
0
0
Hello,

I created two forms called 'frmMain' and 'frmLogin'. I call the 'frmLogin' form up this way:

Code:

Dim checkStatus As Integer
checkStatus = frmLogin.ShowDialog()

If checkStatus = 1 Then
    ' Login was a succes
Else
    ' Arrr pirate, wrong rum.
End If

In 'frmLogin' when I click the btnLogin the application checks the database if the 'details' the user entered are good. When it does I want to return the 1 like Return "1" but that gives me a error: return statement in a sub or a set cannot return a value.

How could I solve this problem?

Viewing all articles
Browse latest Browse all 27091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>