R
RzB
I have a delete button on a form that shows
a bound record.
I use docmd.RunCommand acCmdDeleteRecord
to delete the record as required.
If the record has relationships with other records
with cascading delete turned on, the user gets a
horidly worded warning, and is given the choice
of progressing with the delete or canceling.
I have two questions.
1. If I use this mechanism and the user chooses
to cancel the delete, it would appear that I get
an error code returned of
"3021 = No Current record" - Is this correct?
I have read that there is some problem with
Access 2002 SP3 and that error code.
Am I ok to rely on this error code?
2. I would really like to handle this with code
(prior to doing the delete) to tell the user
that deleting this record, will delete other records,
(in terms he understands). Then do the delete if
they still want to, with docmd.setwarnings false.
However I just don't know where to start to get
the cascaded delete information I need.
Any pointers would be appreciated..
Thanks,
Roy
a bound record.
I use docmd.RunCommand acCmdDeleteRecord
to delete the record as required.
If the record has relationships with other records
with cascading delete turned on, the user gets a
horidly worded warning, and is given the choice
of progressing with the delete or canceling.
I have two questions.
1. If I use this mechanism and the user chooses
to cancel the delete, it would appear that I get
an error code returned of
"3021 = No Current record" - Is this correct?
I have read that there is some problem with
Access 2002 SP3 and that error code.
Am I ok to rely on this error code?
2. I would really like to handle this with code
(prior to doing the delete) to tell the user
that deleting this record, will delete other records,
(in terms he understands). Then do the delete if
they still want to, with docmd.setwarnings false.
However I just don't know where to start to get
the cascaded delete information I need.
Any pointers would be appreciated..
Thanks,
Roy