I have a subform displaying records in a datasheet. On the main form I have a button that will open a form for data entry. I can put some VBA so that when this data entry form closes, it will requery the subform.
However, I also have a doubleclick event on the subform that will open this same data entry form to make it easier to update or modify those records in the subform. The problem is, when you close the data entry form, it will requery the subform which will reset the position and you have to scroll to find the record you were updating.
As a workaround, I removed the code from the data entry form close event and just added a button with this requery code to the main form.
So my question is, is there a way to update a subform form ONLY when a new record is created and NOT if the record is simply updated?
Code:
Forms![MainForm]![SubformName].Form.Requery
However, I also have a doubleclick event on the subform that will open this same data entry form to make it easier to update or modify those records in the subform. The problem is, when you close the data entry form, it will requery the subform which will reset the position and you have to scroll to find the record you were updating.
As a workaround, I removed the code from the data entry form close event and just added a button with this requery code to the main form.
So my question is, is there a way to update a subform form ONLY when a new record is created and NOT if the record is simply updated?