Solved

OnOpen error in Access 2010

Posted on 2013-02-04
3
4,288 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 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 75 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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 75 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sum in Split Form 17 27
Microsoft Access to CSV file from VBA 3 25
Access/Visual Basic Question 3 24
Treeview control in 64 bit Office. 2 15
This is about my first experience with programming Arduino.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…

840 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