Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manual delete leaves delete

Status
Not open for further replies.

chirpyform

Programmer
Jun 20, 2003
202
FR
I have overridden the delete mechanism in a form (because of complicated relationships between the tables) in the On_delete function (cancel = true) so that I can do "DELETE FROM TABLE X WHERE ...". At the end however the screen has #delete in all the areas where I had data.

I have tried requery but I cannot do it in this function and I don't want to have to close and reopen the form or goto another object which is used only to do the requery.

Can anybody give a clean option to this problem....

Many thanks Chris

 
How are ya chirpyform . . . . .

The On Delete event is just not the right place to requery.
Move requery to the [blue]After Delete Confirm[/blue] event.

Be sure to read about it in VBA help so you understand whats going on. In fact, all the delete events should be read.

Calvin.gif
See Ya! . . . . . .
 
Great idea theAceMan1 unfortunately as I do "Cancel = true" I'm not sure that this function is relevant....


Chris
PS MY VBA Help is not working
 
chirpyform . . . .

Yes you did say you were setting Cancel to True. So if Requery does'nt remove #deleted, need to see your relationships (complicated as you say) and wether or not cascades have been selected. Hard to tell otherwise . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top