J
Joe Soap
Hello all
I am new to VB 2008..having come from VB6 after many years.
I have a problem unloading a form.
My frmLogin checks name/password against a database table (SQL Server 2005),
and if a match occurs, the form unloads (Close or Dispose), and shows
another form (frmSwitchboard ). Quite simple.
My code looks like this:
..............
..........
........
'*********************************************************************************************
'Assign the Loggers details to the variables
LogName = m_DataTable.Rows(0)("Name").ToString()
LogID = m_DataTable.Rows(0)("LogID").ToString()
'*********************************************************************************************
frmSwitchboard.Show()
Me.Close()
End If
End Sub
OK, the frmSwitchboard hows momentarily, before disappearing.
The Me.Close() also appears to be closing the frmSwitchboard as well.
I have a similar Me.Close statement on a button my frmSwitchboard , but the
frmSwitchboard opens up the form selected from frmSwitchboard button_click
and unloads frmSwitchboard .
I can't really see why frmLogin is also closing the frmSwitchboard. But what
do I know?
Anyone got any suggestions?
Best regards
David
I am new to VB 2008..having come from VB6 after many years.
I have a problem unloading a form.
My frmLogin checks name/password against a database table (SQL Server 2005),
and if a match occurs, the form unloads (Close or Dispose), and shows
another form (frmSwitchboard ). Quite simple.
My code looks like this:
..............
..........
........
'*********************************************************************************************
'Assign the Loggers details to the variables
LogName = m_DataTable.Rows(0)("Name").ToString()
LogID = m_DataTable.Rows(0)("LogID").ToString()
'*********************************************************************************************
frmSwitchboard.Show()
Me.Close()
End If
End Sub
OK, the frmSwitchboard hows momentarily, before disappearing.
The Me.Close() also appears to be closing the frmSwitchboard as well.
I have a similar Me.Close statement on a button my frmSwitchboard , but the
frmSwitchboard opens up the form selected from frmSwitchboard button_click
and unloads frmSwitchboard .
I can't really see why frmLogin is also closing the frmSwitchboard. But what
do I know?
Anyone got any suggestions?
Best regards
David