I have a form with a subform, the form limits the qry and the subform displays the results.
I need a VBA that selects all records, copies those records AND if possible, updates the first field (date) to the day after the copied date within the same subform.
There are fourteen fields, the first is the date field.
I tried
subform.setfocus
DoCmd.RunCommand acSelectAllRecords
DoCmd.RunCommand acCopy
DoCmd.RunCommand acPasteAppend
but this didn't work - the result was the form closing, opeining only the subform and pasting only the first field in a single new record.
I can do this manually by selecting all records, right click - copy, right click - paste, and manually updating the date field, but there MUST be a better way...
I need a VBA that selects all records, copies those records AND if possible, updates the first field (date) to the day after the copied date within the same subform.
There are fourteen fields, the first is the date field.
I tried
subform.setfocus
DoCmd.RunCommand acSelectAllRecords
DoCmd.RunCommand acCopy
DoCmd.RunCommand acPasteAppend
but this didn't work - the result was the form closing, opeining only the subform and pasting only the first field in a single new record.
I can do this manually by selecting all records, right click - copy, right click - paste, and manually updating the date field, but there MUST be a better way...