derekaustin
New member
- Local time
- Today, 14:09
- Joined
- Apr 21, 2018
- Messages
- 4
I have created a very simple Access 2010 database. It has 2 tables: tblParent and tblChild. Each has a primary key on a single numeric column: called ParentId and ChildId respectively. Each has an additional Index (No Duplicate) on text name columns: called Parent and Child respectively. tblChild has a numeric column ParentId. There is a relationship between tblParent and tblChild on ParentId. There is a form frmParent based on tblParent with a subform frmChild based on tblChild. frmChild has Link Master Fields = ParentId and Link Child Fields = ParentId. Please see attached accdb.
Try the following :
1. Open frmParent
2. Copy TWO child rows to the clipboard for a ParentId (in my data = 33)
3. Select new blank child row and paste.
4.Click OK to clear the resulting paste errors due to uniqueness violation of Child text column.
So far so good - or is it?
5. Manually create (not paste) a new row with a unique child name and save.
6.Close frmParent
7. Reopen frmParent
Where is teh new row you just created.
Looks like after the failed paste Access is stuck in an uncommitted internal transaction; any data changes thereafter are not committed. Surely it should have rolled back the internal transaction?
It works as you would expect for a single row paste - presumably because the internal transaction is easier to manage.
What have I missed?
Try the following :
1. Open frmParent
2. Copy TWO child rows to the clipboard for a ParentId (in my data = 33)
3. Select new blank child row and paste.
4.Click OK to clear the resulting paste errors due to uniqueness violation of Child text column.
So far so good - or is it?
5. Manually create (not paste) a new row with a unique child name and save.
6.Close frmParent
7. Reopen frmParent
Where is teh new row you just created.
Looks like after the failed paste Access is stuck in an uncommitted internal transaction; any data changes thereafter are not committed. Surely it should have rolled back the internal transaction?
It works as you would expect for a single row paste - presumably because the internal transaction is easier to manage.
What have I missed?