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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 Form Code won't run

Status
Not open for further replies.

BrooksR

Programmer
Feb 24, 2001
98
US
I'm an experienced Access developer and haven't seen this before.

I have code behind a button on the form and it won't run. No error or anything. I tried recreating the button with the code and it still won't run.

I put a STOP statement as the first line of code and it doesn't reach it either.

I've clicked on the button, went into Properties, Events, Click event, click on "..." and it jumps right to the code.

Strangest thing. Something seems to be messed up with this form and/or this form's code and I'm not sure how to fix it. Compact and repair didn't help.

Appreciate any ideas.

Brooks
 
You didn't post the code.
Is the button's name on the OnClick event?
Any missing library references? (In VBA, Tools - References)
Did you create a brand new button with brand new code? No copy and paste.
 
fneily - thanks for the post.

Another developer suggested I create a new, empty database and import all the objects. That worked, so I'm all set. (I knew that trick for other problems but it also worked here.)

Brooks
 
BrooksR said:
I've clicked on the button, went into Properties, Events, Click event, click on "..." and it jumps right to the code.
That's usually what fixes this problem. Sometimes controls get "de-attached" from their events, and I've found that going through the click-elipsis-button process relinks it.

By the way, I've never seen this happen in VB6, only in Access. Sigh..


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top