I've searched quite a bit on this but have had no luck.
I have a bound form with a lot of unbound data on it. The unbound data relies on the bound form's primary key, an autonumber. When working with existing records, it's peachy, but when working with a new record, since the bound form data hasn't inserted yet, all of my code that relies on that autonumber is out of luck.
I know that I can stop using autonumbered fields and generate my key manually (there's a good FAQ here on it), but other than that, is there any way for me to force an insert/save before the user changes records (or whenever it occurs). I've tried docmd.RunCommand acCmdSave, but (as I expected) it doesn't do the trick.
How can I force that insert to fire?
I have a bound form with a lot of unbound data on it. The unbound data relies on the bound form's primary key, an autonumber. When working with existing records, it's peachy, but when working with a new record, since the bound form data hasn't inserted yet, all of my code that relies on that autonumber is out of luck.
I know that I can stop using autonumbered fields and generate my key manually (there's a good FAQ here on it), but other than that, is there any way for me to force an insert/save before the user changes records (or whenever it occurs). I've tried docmd.RunCommand acCmdSave, but (as I expected) it doesn't do the trick.
How can I force that insert to fire?