Hi all,
I try to create an error message if a user fills in a date field and leaves a combo box with wrong value.
I have no clue how to use "Is Not" to check the combo box.
The date field that will be filled in is called "Sent to Check" and the combo box is called "Status Case" and the value should be "Sent For Check" If the value in the combo box is different, then the back ground should change to red and get a message.
This is the code I have so far that does not work:
Any ideas what I do wrong?
Greetings.
I try to create an error message if a user fills in a date field and leaves a combo box with wrong value.
I have no clue how to use "Is Not" to check the combo box.
The date field that will be filled in is called "Sent to Check" and the combo box is called "Status Case" and the value should be "Sent For Check" If the value in the combo box is different, then the back ground should change to red and get a message.
This is the code I have so far that does not work:
Code:
Private Sub Test__date_started__AfterUpdate() 'XXXXXXXXXX working onXXXXXXXXXXXXXX
If Not IsNull(Me.[Sent_To_Check] And Me.[Status_Case] IsNot "Sent For Check" Then
MsgBox "Status Case be set to Sent For Check!", , "Incomplete Form!"
Me.[Sent_To_Check].BackColor = RGB(255, 0, 0)
Else
Me.[Sent_To_Check].BackColor = RGB(255, 255, 255)
End If
End SubAny ideas what I do wrong?
Greetings.
if date filled in field, then combo box should have a certain value in it
0 commentaires:
Enregistrer un commentaire