Hi.
You could use DBCC CHECKIDENT (<table Name>, NORESEED) which will give you the current seed, add 1 to that (as long as the seed is set to inc. by one). However, this really isn't a good idea.
As previous post suggests. You should grab the identity of the new record with @@Identity and post to second table as the foreign key - don't forget to wrap in transaction so you don't lose data integrity.
User Profile
Collapse
-
Hi. Access has functionality for this.
Open form B using DoCMD.OpenForm method; you need to specify the FormName you want to open (in this case B). You are also able to pass the window view, mode, filters etc; however the option you want is OpenArgs. Set this value to the ID number shown on form A and within Form_load() on form B use Me.OpenArgs to capture the value. Set it to a private variable on FormB.
This is a...Leave a comment:
No activity results to display
Show More
Leave a comment: