Hi, I have a form - lets call it Form A based upon a query

I have placed a button on my data entry form (Form B) to open Form A in edit mode based upon criteria in Form B (criteria is set in the query) which works fine when a record that I am looking at on Form B exists in the query. However if a record does not exist in the query a blank Form A opens and I can enter the data and save it and it creates a new record. all works fine. (I understand why this happens just want to see if I can do something with it.

However what I would really like is form A to open in edit mode but with some of the fields pre populated based on what record is open in Form B and then allow me to edit the other fields and save a new record in the table which forms part of the query - I have tried setting the properties so the fields I want are linked to Form B but then when I create a new record in the table the query is based on it does not save these entries on the record.

Is there any way to do what I am trying to do?