Is there any way to debug access code ?

D

David

I'm getting an error when I display a form and there is no
indication where the error is, except the message mentions
an event property setting and an 'After Update' event.
However, I've looked at all those and can find nothing
wrong.
This error happens when I click in a listbox that is
supposed to raise an event in some subforms (I think) -
its supposed to change some greyed out controls to active.
Any help appreciated.
I'm an Access novice and am using version 2000.
 
D

David

"The expression After Update you entered as the event
property setting produced the following error: user-
defined type not defined."
 
K

Ken Snell

Sounds as if the words "After Update" are typed in as the "macro" name for
the After Update event.

Open the form in design view, click on the listbox control, click on the
Properties icon on the toolbar, click on Event tab, and delete the words
from the box next to the After Update box.
 
D

Dirk Goldgar

David said:
"The expression After Update you entered as the event
property setting produced the following error: user-
defined type not defined."

Another possibility is that you have an event procedure defined for the
list box's AfterUpdate event, but that procedure has a compile error.
If you go into the VB Editor and click Debug -> Compile, you'll probably
be shown the exact line that is raising the error. Just as a wild
guess, it may be that you are using DAO code that says, maybe, "Dim db
As Database", but you don't have a reference set to the Microsoft DAO
3.6 Object Library. I'm only guessing that because we see that error a
lot, but at any rate, first try compiling your project and see if the
offending code is displayed.
 

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