Error on form after record has been deleted

C

ChrisK

Hi all,

I am using a checkbox control on a form to add a record to a separate table
with postal address information which is displayed as a subform. If the
checkbox is checked, the subform is visible and the data appears. If the
checkbox is then unchecked, the code on the form runs to delete the record
and hide the subform. If however the checkbox is checked again before the
form is closed, I get an Error 3329 indicating that the record has been
deleted and I cannot then change the data on the subform without closing and
reopening the form.

I've tried the me.<subform>.form.refresh to clear the data but this doesn't
work.

Any ideas on how to handle this circumstance?

thanks in advance...

CK
 
L

Linq Adams via AccessMonster.com

Refresh really doesn't do what most people think. It was designed to allow
UserA see what changes UserB has made to a record in a multi-user environment.
It does not reflect additions or deletions. I think you need to requery the
subform afer the deletion.
 
Top