What am I doing wrong here? can anyone help me with this.
Combo box is a bounded one.
I have tried everything. But it still holds the bound values.
I have tried all these codes in the before update event.
If Len(Me.CmboElement & vbNullString) = -1 Then
'MsgBox "Please select the Assigned Element"
'Me.CmboElement.SetFocus
'Cancel = True
' End If
'If Me.CmboElement.ListIndex < 1 Then
'MsgBox "A value is required for ...."
' Me.CmboElement.SetFocus
' Cancel = True
' End If
'If Nz(Me.CmboElement, "") = "" Then
'MsgBox "You must enter a value"
'Cancel = True
'End If
If Len(Me.CmboElement & "") = -1 Then
MsgBox "Please select a Charge Type", vbExclamation, "Required Field"
Cancel = True
Me.CmboElement.SetFocus
End If
'If Nz(Me.ElementID, "") = "" Then
' MsgBox "You Must Fill In Charge Type Field!"
'Cancel = True
'ElementID.SetFocus
'End If
'End Sub
But still no changes. Is sthg wrong with the code?