Fetch records based on a form date field then update the collected records

Fetch records based on a form date field then update the collected records

Hi

I have a form with a date field so i fetch a range of dates like this

    rangetocancel  =  Hospital_Rooms  [(Date1 >= anycancel.Admission_Date && Date1 <= anycancel.Discharge_Date)];
  
seems to work as the collection holds 4 records and there are 4 dates from admission to discharge

Then i want to update another field in the same form

        rangetocancel.room1 = "empty";

BUT

it only seems to modify the first date Admission Date not the date range from Admission to Discharge

any ideas ?