How to determine what unkown procedure is running

D

David G.

I have a form that (with module) that is "misbehaving". In trying to
diagnose the problem/s I've noticed the VBE displays "running" in the
window title bar, after any open/load events have been processed.
The locals window shows "<Running>" but there are no expressions
listed.
How can I determine what procedure is causing this behavior?
THANKS!
David G.
 
D

Dirk Goldgar

in message
I have a form that (with module) that is "misbehaving". In trying to
diagnose the problem/s I've noticed the VBE displays "running" in the
window title bar, after any open/load events have been processed. The
locals window shows "<Running>" but there are no expressions listed. How
can I determine what procedure is causing this behavior?

Can you break into the code by pressing Ctrl+Break?
 
D

David G.

in message


Can you break into the code by pressing Ctrl+Break?

Yes. I can run (and step thru) other procedures by clicking on form
objects.

I noticed I was opening the form using "acDialog" for the window
setting. Using "acWindowNormal", and making the form's "Modal"
property to "true" accomplishes what I want and I no longer see the
[running] message.

I'm still having trouble with the form's behavior. When I start a New
Record, then try to save the new record, I get a 2759 Error message. I
have code that runs during the BeforeInsert and AfterUpdate which
indicates the record has been added. (The record also appears in the
table.) It's as if the form was trying to save the record a second
time.
THANKS!
David G.
 
D

Dirk Goldgar

in message
I noticed I was opening the form using "acDialog" for the window setting.
Using "acWindowNormal", and making the form's "Modal" property to "true"
accomplishes what I want and I no longer see the [running] message.

So that issue is resolved. Fine.
I'm still having trouble with the form's behavior. When I start a New
Record, then try to save the new record, I get a 2759 Error message. I
have code that runs during the BeforeInsert and AfterUpdate which
indicates the record has been added. (The record also appears in the
table.) It's as if the form was trying to save the record a second time.

I can't guess what might cause that error unless you post the code involved.
Please do that, and indicate, if possible, which line of code is raising the
error.
 
D

David G.

in message
I noticed I was opening the form using "acDialog" for the window setting.
Using "acWindowNormal", and making the form's "Modal" property to "true"
accomplishes what I want and I no longer see the [running] message.

So that issue is resolved. Fine.
I'm still having trouble with the form's behavior. When I start a New
Record, then try to save the new record, I get a 2759 Error message. I
have code that runs during the BeforeInsert and AfterUpdate which
indicates the record has been added. (The record also appears in the
table.) It's as if the form was trying to save the record a second time.

I can't guess what might cause that error unless you post the code involved.
Please do that, and indicate, if possible, which line of code is raisingthe
error.

Dirk:
Thanks for your comments. I discovered I had placed a line of code
that updated a hidden field in the AfterUpdate event. Duh! It caused
the record to be "dirty" and require another "Save" before continuing.
THANKS!
David G.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top