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!

Compile errors in forms

Status
Not open for further replies.

davem1958

Programmer
Oct 10, 2001
17
0
0
US

I checked the FAQs, but didn't find anything.

How do you tell Access to compile the code associated with a form, and tell me where the problem lies?

In a module, I just hit F5, and there it is. If I try the same in a form, it wants to know what Macro I want to run.

Dave.
 
Dave:

1) Make sure all your error checking is turned off - I've caught myself here a few times ... *sigh*

2) When the error pops up, click on Debug - should point you right to where the error occurs, and in my experience, it's regardless of the version of Access you're using.

HTH


Greg Tammi, IT Design & Consultation
Work: Home:
 
I don't get that far. When I load the form, the error message is

"The expression On Load you entered as the event property setting produced the following error: Expected Function or variable."

None of the code runs, but form loads anyway.

Must be some way to spot which code it's complaining about.

Dave.

 
Found it. There's a menu item Debug, Compile <YourApp> that does what I want. Too bad I didn't find it two weeks ago. :)

Dave.
 
Hi Dave!

Actually, the error you got is Access trying to tell you that you put an illegal expression in the On Load line of the event tab in the form's property window. You may need a compact and repair to fix the problem assuming that you actually have the property set up correctly and the name of the event procedure spelled correctly.

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top