Try this
Private Sub TabControl1_Selecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles TabControl1.Selecting
If fNameTxtBox.Text = "" Or
IDTxtBox.Text = "" Then
MessageBox.Show("You must enter a Name and ID number.", "Data Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
e.Cancel = True '<<<< were telling VB that the event shoulb be terminated
fNameTxtBox.Focus()
End If
End Sub
'For Button
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If fNameTxtBox.Text = "" Or
IDTxtBox.Text = "" Then
MessageBox.Show("You must enter a Name and ID number.", "Data Entry Error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
'Choose one here
TabControl1.SelectedTab = TabPage1 'Assuming TabPage1 is the tab where the fNameTxtBox is resides
TabControl1.SelectedIndex = 0 'Assuming the index number of the TabPage in the tab control where the fNameTxtBox is resides
fNameTxtBox.Focus()
End If
End Sub