468,765 Members | 1,430 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Delete record

Sorry to repost, but am having another look at deleting a record.

I have a form (Member) and have removed all the event procedures associated
with the Form (OnCurrent, OnDelete, OnActivate etc)
When I click on the record bar and press delete it comes up with the correct
message "You are about to delete 1 record ....", the record count drops by 1
and I say "Yes - delete it". Seems OK, record is no longer there.
Than after closing the form and re-opening the record is back and the record
count back to the original number.

Any Ideas?

Thanks

Phil
Apr 25 '07 #1
4 4054
On Apr 25, 5:27 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
Sorry to repost, but am having another look at deleting a record.

I have a form (Member) and have removed all the event procedures associated
with the Form (OnCurrent, OnDelete, OnActivate etc)
When I click on the record bar and press delete it comes up with the correct
message "You are about to delete 1 record ....", the record count drops by 1
and I say "Yes - delete it". Seems OK, record is no longer there.
Than after closing the form and re-opening the record is back and the record
count back to the original number.

Any Ideas?

Thanks

Phil
Just ideas...
Is there anything in BeforeUpdate, or anything that could possibly
cancel an update in another event or sub? Is the Forms Allow Deletes/
Updates etc. set to true? Do you know that the recordset or underlying
table is not in a read-only state?
Apr 26 '07 #2
It sounds like you intend to allow the deletion, but in fact you are
CANCELing the deletion. Make sure that the value associated with your
'Yes - delete it' button is equal to the vbCancel (object browser)
value.

King Ron of Chi
On Apr 25, 4:27 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
Sorry to repost, but am having another look at deleting a record.

I have a form (Member) and have removed all the event procedures associated
with the Form (OnCurrent, OnDelete, OnActivate etc)
When I click on the record bar and press delete it comes up with the correct
message "You are about to delete 1 record ....", the record count drops by 1
and I say "Yes - delete it". Seems OK, record is no longer there.
Than after closing the form and re-opening the record is back and the record
count back to the original number.

Any Ideas?

Thanks

Phil

Apr 26 '07 #3
Thanks for thoughts

As I said, have temporarily removed all Form events (but not Control events)
Form is set to allow additions and deletions and as I can amend the record,
I ssume that the tables are not read-only. There is no problem if I go to
the table and delete the record even after deleting it (or more accurately,
failing to delete using the form).

Have had a thought and have tried deleting the record from the query on
which the form is based. Again it appears to delete OK, but close the query
and re-open it, and there is the record again. That eliminates any problem
with the form.

Thanks

Phil

"storrboy" <st******@sympatico.cawrote in message
news:11**********************@t39g2000prd.googlegr oups.com...
On Apr 25, 5:27 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
>Sorry to repost, but am having another look at deleting a record.

I have a form (Member) and have removed all the event procedures
associated
with the Form (OnCurrent, OnDelete, OnActivate etc)
When I click on the record bar and press delete it comes up with the
correct
message "You are about to delete 1 record ....", the record count drops
by 1
and I say "Yes - delete it". Seems OK, record is no longer there.
Than after closing the form and re-opening the record is back and the
record
count back to the original number.

Any Ideas?

Thanks

Phil

Just ideas...
Is there anything in BeforeUpdate, or anything that could possibly
cancel an update in another event or sub? Is the Forms Allow Deletes/
Updates etc. set to true? Do you know that the recordset or underlying
table is not in a read-only state?


Apr 26 '07 #4
Thanks for coming back

Have had a thought and have tried deleting the record from the query on
which the form is based. Again it appears to delete OK, but close the query
and re-open it, and there is the record again. That eliminates any problem
with the form.

Just in case the standard delete message box has become corrupted, If I
press "Yes", the record count stays at the lower value; if I press "No", the
recordcount goes up by 1 to the original value.

Thanks

Phil
"King Ron" <Ki***************@covad.netwrote in message
news:11**********************@r30g2000prh.googlegr oups.com...
It sounds like you intend to allow the deletion, but in fact you are
CANCELing the deletion. Make sure that the value associated with your
'Yes - delete it' button is equal to the vbCancel (object browser)
value.

King Ron of Chi
On Apr 25, 4:27 pm, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
>Sorry to repost, but am having another look at deleting a record.

I have a form (Member) and have removed all the event procedures
associated
with the Form (OnCurrent, OnDelete, OnActivate etc)
When I click on the record bar and press delete it comes up with the
correct
message "You are about to delete 1 record ....", the record count drops
by 1
and I say "Yes - delete it". Seems OK, record is no longer there.
Than after closing the form and re-opening the record is back and the
record
count back to the original number.

Any Ideas?

Thanks

Phil


Apr 26 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Someonekicked | last post: by
9 posts views Thread by Robert Schneider | last post: by
8 posts views Thread by Steve | last post: by
4 posts views Thread by Susan Bricker | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.