![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, Im using the after update event of a field from a bound form to add records using the recordset object, to a related table. However i'm getting the 3201 error, telling me I must have a related record in the parent table. But i've just put it in, since the 'afterupdate' wont fire until i have ? It works fine when i'm changing the record in the parent table, since im not changing the primary key, but happens when i'm adding a new record. Any explaination, or advice most welcome Gerry Abbott |
#3
| |||
| |||
|
|
Hi all, Im using the after update event of a field from a bound form to add records using the recordset object, to a related table. However i'm getting the 3201 error, telling me I must have a related record in the parent table. But i've just put it in, since the 'afterupdate' wont fire until i have ? It works fine when i'm changing the record in the parent table, since im not changing the primary key, but happens when i'm adding a new record. Any explaination, or advice most welcome Gerry Abbott |
#4
| |||
| |||
|
|
It sounds like you need to save the parent record before adding the new child ones. The value of the field may be getting updated, but this does not save the record. If you precede your record-adding code with DoCmd.RunCommand acCmdSaveRecord that should help. "Gerry Abbott" <please (AT) ask (DOT) ie> wrote in message news:1amrd.42996$Z14.18490 (AT) news (DOT) indigo.ie... Hi all, Im using the after update event of a field from a bound form to add records using the recordset object, to a related table. However i'm getting the 3201 error, telling me I must have a related record in the parent table. But i've just put it in, since the 'afterupdate' wont fire until i have ? It works fine when i'm changing the record in the parent table, since im not changing the primary key, but happens when i'm adding a new record. Any explaination, or advice most welcome Gerry Abbott |
![]() |
| Thread Tools | |
| Display Modes | |
| |