No error 547 when deleting after Recordset.Find in adp

C

clorentson

Hi All,

I have found a pecular problem with Access Data Projects . If I move to a
new record on the form using the standard navigation buttons and then try to
delete a referenced row I receive error 547 "DELETE statement conflicted with
COLUMN REFERENCE constraint..." This is fine and completely expected.

However...

If I position to record using the Recordset Find method (such as when using
the "find on this form..." combo box wizard), I no longer get the message.
In fact, it doesn't even raise the On Error event for the form. It just
silently fails on the delete.

This of course can be quite confusing to users who don't know why the record
is not being deleted.

I've recreated it using NorthwindCS.adp as follows:
1. Create a form based based on the Product table using autoform
(discovered that situation only seems to occur if there is a subform).
2. Navigate to the second product, Chang, which is referenced by an Order
Detail.
3. Click the record selector.
4. Press the delete key.
5. Respond Yes/OK to the delete confirm dialog.
6. You'll get the error referenced above "DELETE statement..." because the
record is referenced.

Now, edit the form and use the combo box wizard to add a "find record on
this form" combo box and try this:
1. Navigate to second product, Chang, using the navigation buttons as above.
2. Try to delete the record, you should get the "DELETE..." error.
3. Select Chang from the combo box.
4. Try to delete the record. It will not issue an error and the record
stays.

Any insights into what is happening?

Thanks,
Carl
 
Top