Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here




a sampling of some code is below. when i activate the command button nothing happens except for an error that says the expression on click you entered as the event property setting setting produced the following error.........

The error message occurs with several command buttons. the message box does not appear which leads me to believe that the code is not being seen at all. and thoughts?

Private Sub Command4_Click()
'DoCmd.OpenForm "frm_setupParts"

MsgBox "help"

thank you

RE: error

This happens when something else is wrong in the code somewhere else. So in vba go in and compile the code. It should then show you where the error is.

RE: error

i compiled and found no problems. i am systematically disabling sections of code in an attempt to isolate the problem

RE: error

try a compact and repair.

RE: error

no luck. the problem appears to nearly all events. i ran anti virus ok. one of the other suggestions was to fing a possible missing rference. i'm lost

RE: error

Do this.
1. Create a new blank database.
2. In the options turn off track name autocorrect
3. Use the import features to import all the tables into the new database
4. Compact and Repair
5. Import your queries, code modules, you should be able to include the reports if they do not have a lot of code on them.
6. Import your forms 1 by 1 and test them
7. If you get a bad form you will know which one it is.

The reason to turn of the track name autocorrect is that it will try to rename table names or field names in queries. So if you rename tblOne to TblTwo it automatically updates the queries. In the import process if it cannot find the table or form it will screw up the query. That is also why I always import all tables first.

This is unlikely to be a missing reference. If it was a missing reference the error would be specific to where you try to use that object. So if you tried to use a reference to Excel but no excel object library it would specifically fail there. I also do not think it is datbase corruption, but it could be. Either way you should be able to fix it or identify a bad form based on what was provided. If the form is bad either rebuild it or try to remove all the code and add it back in.

RE: error


In the options turn off track name autocorrect

I see autocorrect with 5 possibilities (correct or capitalize) and no track verbage...is this right? (no on or off) ok ....i see 3 choices, track name autocorrect info,perform name autocorrect and log name autocorrect. these 3 items are to be turned off?

RE: error

I don't know where you are finding 5 possibilities for name autocorrect. What version and operating system.

Check this page for options and then uncheck all of the options.

Did you find a missing reference?

Hook'D on Access
MS Access MVP 2001-2016

RE: error

Not required as long as you import the tables before the queries. Just an extra layer of safety. I personally do not even do it, but I am on the look out and understand what can happen if you do not.

RE: error

I did not find a missing reference. Running Win7 and Access 2002. I'm working on tables now. I see name autocorrect, I was in the wrong options. Now i see why software engineers have a 6 figure income. so do i but they move the decimal over 2 spots.
$ 123456.00
$ 1234.56

RE: error

Depending on error handling code used, sometimes, for debugging, I change error trapping options in VBE (Tools>Options dialog, error trapping frame) to either first or second option. This allows to see where the code really breaks if the error is in form module.


RE: error

I ran the 7 step procedure on nearly 100 tables and forms and ended up with more errors than I had to begin with. I'm thinking a total rebuild at this point and have not been able to resolve the original issue.

RE: error

Maybe it's time to step away from Access 2002 which is 16 years old.

Hook'D on Access
MS Access MVP 2001-2016

RE: error

dhookom and all others. I took your advice and got access 2016. EVERY THING WORKS - NOT A SINGLE PROBLEM! tHANX FOR ALL OF YOUR TIME.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close