Debugging. I need to break on writing to a backend table. (1 Viewer)

AOSB

Registered User.
Local time
Today, 09:14
Joined
Sep 12, 2011
Messages
18
I have built a complex split accdb database which has run well for many months. The users have only just started to use one of the features and a problem has arisen as a result.
In order to debug the problem I need to break the program execution whenever there is a write attempted to a particular table.
I can't seem to find a way to do that. It might be a Data Macro is required but that is unexplored territory for me and any help would be appreciated.
 

AOSB

Registered User.
Local time
Today, 09:14
Joined
Sep 12, 2011
Messages
18
Thank you. I didn't know about that, I am sure I will be using in some future debugging exercise.
In my case I have been continuing to look at data macros. First I had to temporally change the problem table from Linked to Local. Then I can can attach a Raise Error event on Updating, Inserting or Deleting events either before or after the event. This breaks the code and has given me the chance to see exactly what is going on. I have not yet found the error but Im now a lot closer to finding it. I must remember to make the table linked when I have finished! Thanks again. Alan
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:14
Joined
Feb 28, 2001
Messages
26,999
If the table in question is bound to a form, you could put a breakpoint in the form update event code. (Hint, hint - if you have a bound form without a BeforeUpdate event handler MAKE such an event handler.)

If the update occurs as the result of VBA code rather than bound-form controls, you should be able to find the place where the update occurs in your code and set a breakpoint there.

If your event-code is a macro, you could always write a one-line function in VBA to return a 0 for the function's value, then set a breakpoint on the VBA value-return statement, and then finally insert a RunCode step in your macro just before the relevant update.
 

Users who are viewing this thread

Top Bottom