I need to check if a combo box and text box have an empty string in ACCESS. If they do, then I don't want to save a record in my table.
I have added the code below in my application, but the record still saves.
Dim sql As String
If cboClientName.Value = Null Or cboClientName.Value = "" Then
MsgBox ("Please make sure Client Name is filled in.")
ElseIf txtJobName.Value = Null Or txtJobName.Value = "" Then
MsgBox ("Please make sure Job Name is filled in.")
sql = "Insert Into tblJOb ....)"
What am i doing wrong? How do I fix this? Thanks in advance.