J
Jonathan Scott via AccessMonster.com
I have a subform which I allow adding of records. The recordsource of the
subform is a joined query, where one of the tables has a unique constraint on
it. This relation is one-to-many.
When I add a record, part of which violates the constraint, I get an error.
Inside the Form_Error() subroutine I have it print out Err.Number. But it
comes out as '0'. Trying "Resume Next" gives me an error that I can only use
it when an error has occurred, yet I am INSIDE the Form_Error() subroutine!
In a CurrentDB.Execute, I can have the constraint violation not stop
execution by not using the option "dbFailOnError", and the rest of the record
can be added. However, in the subform, I appear to not have this option. Is
there a way I can get the record added? As long as the table with a unique
constraint in it is linked properly to the other table entry I am putting in,
I don't care if the constraint throws or not.
Any help would be appreciated,
Jonathan Scott
subform is a joined query, where one of the tables has a unique constraint on
it. This relation is one-to-many.
When I add a record, part of which violates the constraint, I get an error.
Inside the Form_Error() subroutine I have it print out Err.Number. But it
comes out as '0'. Trying "Resume Next" gives me an error that I can only use
it when an error has occurred, yet I am INSIDE the Form_Error() subroutine!
In a CurrentDB.Execute, I can have the constraint violation not stop
execution by not using the option "dbFailOnError", and the rest of the record
can be added. However, in the subform, I appear to not have this option. Is
there a way I can get the record added? As long as the table with a unique
constraint in it is linked properly to the other table entry I am putting in,
I don't care if the constraint throws or not.
Any help would be appreciated,
Jonathan Scott