odd things when I delete (1 Viewer)

bauer

Registered User.
Local time
Yesterday, 19:08
Joined
Aug 23, 2001
Messages
77
I have a few problems with deleteing a record from my table/form. (A2K)

My form is based on a query of two tables, Order(1) and Fee(M). The Fee table has a condition where one of the feilds=1, so now, when I delete from the form, (using the wizard generated button) only the Fee record gets deleted, not the Order. I believe this happens b/c of the conditino in the query.

Now, my problem is this, when I try to delete, I no longer get the Access warning that I'm about to delete, but not on the last record. As well, the Form_AfterDelConfirm event doesn't fire.

Basically, what I'm trying to do is this: After they confirm the delete, I want to run a delete query to delete the record that they have chosen to delete. However, if I dont' get either of those events, it's a bit hard to do this.

As well, my other problem was this. Instead of the above, I was going to dump the doCmd command, and do it all through code, however, I can't seem to refresh the form, and on top of that, I can't move to any other records(also through buttons that I got from the wizard).

I'm not sure if I've given enough info, but I'll be more than happy to expound, as I'm really stuck here.
 

boblarson

Smeghead
Local time
Yesterday, 16:08
Joined
Jan 12, 2001
Messages
32,059
What it sounds like is that you may have used the Docmd.Setwarnings False somewhere in the database at one time and didn't reset the Docmd.Setwarnings True.

What I would do is to go search for one (you can use the search in the VBE to find it) and then fix it where you need to. If you still can't find it, I would try adding code to a module or a new module to just run it once to see if that works. Just open a new module and paste in this code:

Public Sub ResetWarnings()
Docmd.Setwarnings True
End Sub

Then, run that sub by itself and then see if it did the trick.

BL

[This message has been edited by boblarson (edited 05-06-2002).]
 

bauer

Registered User.
Local time
Yesterday, 19:08
Joined
Aug 23, 2001
Messages
77
thank you for your reply.

I am pretty sure that I didn't set the setwarning = false. However, I decided to do away with that train of thought, and reworked my tables so I don't have to do that delete through code anymore.
 

Users who are viewing this thread

Top Bottom