I was looking for a way to assign values to fields from a previous record.
After trying Microsoft's solution (that didn't work), I searched and found this article which worked like a charm.
The only problem is that when I use the code in a form that has had no previous records, Access pops up an error message saying that there are no previous records found (logically...), after which (when pressing OK) everything works perfectly. The above page says:
If you do not wish to see any error messages, you could just set the Before Insert property of the form to:
=CarryOver([Form], "")
The problem is that I don't know where to insert this line. If I insert it in the BeforeInsert property, the actual code in step 9 of the page above doesn't work anymore.
I contacted Allen Browne via email but he responded that they are not able to provide support for all the free stuff on the website
So my question is where exactly should I insert the =CarryOver([Form], "") command?
And is it supposed to be inserted exactly as it is written, or do I have to replace the [Form] with the actual name of the form I'm inserting it to?
Thank you in advance
After trying Microsoft's solution (that didn't work), I searched and found this article which worked like a charm.
The only problem is that when I use the code in a form that has had no previous records, Access pops up an error message saying that there are no previous records found (logically...), after which (when pressing OK) everything works perfectly. The above page says:
If you do not wish to see any error messages, you could just set the Before Insert property of the form to:
=CarryOver([Form], "")
The problem is that I don't know where to insert this line. If I insert it in the BeforeInsert property, the actual code in step 9 of the page above doesn't work anymore.
I contacted Allen Browne via email but he responded that they are not able to provide support for all the free stuff on the website
So my question is where exactly should I insert the =CarryOver([Form], "") command?
And is it supposed to be inserted exactly as it is written, or do I have to replace the [Form] with the actual name of the form I'm inserting it to?
Thank you in advance