G
Guest
Hi all,
I've a form with some subforms. One one of the subforms is a command button
that updates the subform table record. This all works fine, however, when I
"X" to close the subform, I get the two-headed message monster of:
" The changes you requested to the table were not successful because they
would create duplicate calues in the index, primary key, or relationship.
Change the data in the field or fields that contain the duplicate data,
remove the index, or redefine the index to permit duplicate entries and try
again."
and:
"You can't save this record at this time. Do you want to close the database
object anyway?"
So, it seems the default of the "X" button is to update the table by
creating a new record? Is there any way around this behavior or messages? I
tried putting "DoCmd.SetWarnings False" in the BeforeUpdate event of the
subform, but that didn't help.
Thanks,
Rodi
I've a form with some subforms. One one of the subforms is a command button
that updates the subform table record. This all works fine, however, when I
"X" to close the subform, I get the two-headed message monster of:
" The changes you requested to the table were not successful because they
would create duplicate calues in the index, primary key, or relationship.
Change the data in the field or fields that contain the duplicate data,
remove the index, or redefine the index to permit duplicate entries and try
again."
and:
"You can't save this record at this time. Do you want to close the database
object anyway?"
So, it seems the default of the "X" button is to update the table by
creating a new record? Is there any way around this behavior or messages? I
tried putting "DoCmd.SetWarnings False" in the BeforeUpdate event of the
subform, but that didn't help.
Thanks,
Rodi