B
bumpmobile
Hello folks. I am running Acess 2003 at a therapeutic boarding school. I
have a form that therapists can use to select which diagnoses kids have. On
this form I have a button which runs an append query to add their selections
to a table, tblDiagnoses. I have the indexes in tblDiagnoses set so that one
kid cannot have the same diagnosis twice. I am absolutely sure one of the
therapists will try to do this though. I have tried to add error handling
but I still get the Index/Key Violation-Yes, No Cancel screen and never get
to the error handling (except in the case of a "cancel"). Is there any way to
make a key violation trigger an actual error? I have tried both:
docmd.OpenQuery "qryAppendDiagnosis", acViewNormal
as well as
docmd.RunSQL "SQL cut and pasted from SQL view of qryAppendDiagnosis"
Thanks in advance,
Adam
have a form that therapists can use to select which diagnoses kids have. On
this form I have a button which runs an append query to add their selections
to a table, tblDiagnoses. I have the indexes in tblDiagnoses set so that one
kid cannot have the same diagnosis twice. I am absolutely sure one of the
therapists will try to do this though. I have tried to add error handling
but I still get the Index/Key Violation-Yes, No Cancel screen and never get
to the error handling (except in the case of a "cancel"). Is there any way to
make a key violation trigger an actual error? I have tried both:
docmd.OpenQuery "qryAppendDiagnosis", acViewNormal
as well as
docmd.RunSQL "SQL cut and pasted from SQL view of qryAppendDiagnosis"
Thanks in advance,
Adam