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

error

Status
Not open for further replies.

hoofit

Technical User
Nov 20, 2005
343
0
0
US
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
 
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.
 
i compiled and found no problems. i am systematically disabling sections of code in an attempt to isolate the problem
 
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
 
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.
 

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?
 
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?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
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.
 
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
 
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.

combo
 
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.
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top