G
Guest
I would like to add a child record using VB event code. It's simple in datasheet mode - all I have to do is put the data into the child fileds of a new row. As soon as I put a the parent's id into the child's llnk field, the row expands to the right to show the fields in the parent record (e.g., the joined row)
In VB, I create a new row using DoCmd.GoToRecord , , acNewRec. I populate the fields with data, including the child field that links me to the parent, then exit
When I try to add another child (by creating a new row), I get error message saying that I cannot add the new record (the previous one, I assume) because it would create a duplicate parent record. I don't want to create a new parent, I just want to link the new child to an existing parent. I've tried several save/update commands that don't work. What code should I use in VB so that my child record is created linked to it's pre-existing parent
If you post a reply in this forum, please send me e-mail to let me know. Thx!
In VB, I create a new row using DoCmd.GoToRecord , , acNewRec. I populate the fields with data, including the child field that links me to the parent, then exit
When I try to add another child (by creating a new row), I get error message saying that I cannot add the new record (the previous one, I assume) because it would create a duplicate parent record. I don't want to create a new parent, I just want to link the new child to an existing parent. I've tried several save/update commands that don't work. What code should I use in VB so that my child record is created linked to it's pre-existing parent
If you post a reply in this forum, please send me e-mail to let me know. Thx!