I’m trying to return an error message if the cbo_moduleName field is empty once the submit button is clicked but nothing is happening.
Private Sub btnSubmit_Click()
If IsEmpty(cbo_moduleName.Value) Then
MsgBox ("Module Name field empty!")
Exit Sub
End If
End Sub
Any idea where I am making my mistake?
IsEmptychecks whether a variable of typeVariantcontains a special valueEmpty.What you probably meant is checking if a string is an empty string: