View Full Version : incrementing one field, duplicate rest


warco
07-29-2003, 01:37 PM
I am having a problem with a very basic macro. I attached a incremental expression for my invoice # field to a duplicate button in my form through a macro. I did this so that I could make duplicate records with only the invoice number changed. Everything was going as planned until I realized that the original of my duplicated entries was not being recorded into my table. I think it may be because the record is returned to the table only after the "+1" increment The macro is signalled on the down mouse click, but I even tried to assign it to another event and the same problem occured.

My solution right now doesn't involve any VB code and I like it because of this simplicity but is there a command to make it record each entry into my table before incrementing 1. Also I think the afterupdate function can help, but I don't understand how to use the far right column of the expression builder. Thanks in advance for your advice

stormin_norm
08-19-2003, 06:01 AM
I believe the only way to code this is with VBA doing a recordset clone

Check out this one:

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=43990&highlight=recordset+clone


Do a search on RecordsetClone or Clone across these forums for other links.


And on MSDN (msdn.microsoft.com [access section]):

http://search.microsoft.com/search/results.aspx?View=msdn&st=a&qu=recordsetclone&c=4&s=2