Date field to trigger change of select field

I have a form with a date field and a field name status with yes = 1 and no = 0. I would like if the date field is null then status should stay at 1. If someone selects a date and saves the form the status needs to change to 0. I’ve tried every possible event with :

if({date} == null) 
{
{status} = '1'
}
elseif({date} != null) 
{
{status} = '0'
}

I’ve also tried using an ajax event but nothing happens. I then tried using the update macro to update the table where status = whatever. Is there an easier way to do this. If the date field had the option to reload fields of type select, blah, blah with ajax then I probably wouldn’t be having a problem. Any suggestions?