G
Guest
I have a form, with fields bound, via a query, to two separate tables. There is an occasional need to replicate the current record, via a control button on the form, preserving the values of all save two of the existing fields. The easiest solution would seem to be to create an exact facsimile of the current record, and then programmatically clear the two fields in question, ready for the input of new values, but I cannot find a simple way of doing this. I have successfully created a new record, with ‘DoCmd.GoToRecord , , acNewRec’ but all its fields are, of course, null. The only way I can populate those fields is to copy the contents of each field into public ‘buffer’ variables, before running the GoToRecord command, and then copy them back again afterwards. That means creating a whole set of buffer variables, of all different types, specifically for the purpose, and then writing nearly a page of code to effect the copying process. It works just fine, but could hardly be described as elegant. There must surely be a better solution?