Select Case MainTable.Name
Case "A"
If Tables("A.B").current IsNot Nothing Then
Tables("A.B").Select(0,0)
End If
If Tables("A.B") Is Nothing Then
Tables("B").Select(0,0)
Case "B"
Tables("B.A").Select(0,0)
End Select