Hi
I want the date field checked, if there is a date entered I need there to be a qty in the qty field if not I want a txt box to say please enter a qty, the qty field to go yellow and the form to stay open.
If there is a date and there is a qty I just want the form to close and if there is neither i want the form to close
I have come up with this so far:
If Not IsNull(Me.DATE1) and me.qty1="0" Then
MsgBox "Please enter a Qty"
Me.QTY1.BackColor = 8454143
Else
Me.QTY1.BackColor = 16777215
DoCmd.Close
End If
This works in a way, if there is a date entered the qty field will go yellow and the msgbox appears and if there is no date entered then the form closes, however the qty box is not checked so it doesnt matter what is in there
Any ideas