Dim username As String = txtUser.Text
Dim password As String = txtPass.Text
//check if username and password exist
checklogin(username, password)
If RS.EOF Then
MessageBox.Show("Mismatch Entry", "confirmation Message", MessageBoxButtons.OKCancel, MessageBoxIcon.Error)
txtUser.Clear()
txtUser.Focus()
Else
Me.Hide()
//problem starts here
checkposition()
If (position = "Officer")
OfficerForm.Show()
Elseif (position = "Head")
HeadForm.Show()
Elseif (position = "Admin")
AdminForm.Show()
Else
// dialog box
End If
End Sub