I think you'll find it doesn't work if run in a "second connection". I think you just need to ensure it is run as a new statement in the same connection after any outstanding commit.
In reply to Re^3: Last Insert ID in MS Access
by mje
in thread Last Insert ID in MS Access
by greyhawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |