When I add this code in my project then the logic is not giving expected output
If e.KeyCode = Keys.Enter And cbmPassportCountry.Text.Trim() <> "" Then
SendKeys.Send("{tab}")
Else
If btnSave.Enabled = True Then
btnSave.Focus()
End If
End If
If I use this logic then my code gives expected output
Private Sub cbmPassportCountry_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cbmPassportCountry.KeyDown
'If e.KeyCode = Keys.Enter And cbmPassportCountry.Text.Trim() <> "" Then
If e.KeyCode = Keys.Enter Then
If btnSave.Enabled = True Then
btnSave.Focus()
Else
SendKeys.Send("{tab}")
End If
End If
End Sub
But I want to implement that And
Logic in my code which will work like my next logic