Dear All
I am very new to the Access and the forum. I need urgent help. I have form in which I have one of the x field which is disabled and is enabled when criteria met from the other y field, i want to make the the the x field required ( non null) only when enabled. How can I do that
You could use the form's BeforeUpdate event to do that.
Code:
Private Sub Form_BeforeUpdate (Cancel as Integer)
If x.enabled = TRUE Then
If Len(x & vbNullString) = 0 Then
MsgBox "Field 'x' is required. Please enter a value"
Cancel = TRUE
End If
End If
End Sub