Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OnOpen error in Access 2010

Posted on 2013-02-04
3
Medium Priority
?
5,500 Views
Last Modified: 2013-02-04
I have an Access Database. I am using VBA to Open Forms, for example,

DoCmd.OpenForm "F_Contact"

This database has been working fine for several days but today I get an error

This error occurs when an event has failed to run because the location of the logic for the event cannot be evaluated. For example, if the OnOpen property of a form is set to =[Field], this error occurs because a macro or event name is expected to run when the event occurs.

See screenshot attached.
Error-in-Access.docx
0
Comment
Question by:DataTrain
3 Comments
 
LVL 49

Assisted Solution

by:Dale Fye
Dale Fye earned 300 total points
ID: 38850728
Open the VBA code window (CTRL-G).

Click Debug->Compile to compile your application.  This should find and highlight all of the errors in your code.  Fix each error, then try again (Debug->Compile), until it compiles without error.
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 300 total points
ID: 38850729
Do you have code running in the Open or Load event of the form?

You might try Compiling your code. To do that, open the Visual Basic Editor (Ctrl + F11) and click Debug - Compile. Fix any errors, and then Compact your database.
0
 

Author Closing Comment

by:DataTrain
ID: 38850907
It has started working again without me doing anything! I have taken on board your advice. Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question