Solved

Error msgbox '31005' - Access failed......

Posted on 2007-11-25
7
960 Views
Last Modified: 2013-11-28
txtText1 is a form field bounded to tblMain. tblMain.Test1 is a mandatory field.

User entered a data in a text box and then removed it later for one reason or the other. User proceded to enter all other fields but skips txtTest1.

User eventually forgot to re-enter data in the txtTest1 form field. When user clicked the btnAddNew record to advance to a new record screen a msgbox flagged telling user that txtTest1 must be filled.

Also immediately and before user gets the chance to enter data in the txtTest1 form field, another  Microsoft Access Error '31005' dialogbox immediately popup with the following message :

"Access failed to evaluate one or more expressions because '|'
was referenced in an expression. Only functions and properties
that are considered to be safe are allowed in expressions when
Access runs in sandbox mode."

Question:
User does not know what this new message means and how to disable the msgbox from showing in the future.
0
Comment
Question by:billcute
7 Comments
 
LVL 46

Accepted Solution

by:
tbsgadi earned 200 total points
ID: 20345474
Hi billcute,

Checkout http://support.microsoft.com/kb/294698


Good Luck!

Gary
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 200 total points
ID: 20345998
Bill:

Open Access:
menu >>Tools>>Macro>>Security...
Se to Low.

mx
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 100 total points
ID: 20346680

  Not sure your going to find the answer to this as I believe it's an internal bug your running into.

  Access uses the | (vertical pipe) as a place holder for expressions as part of its internal processing.  When you see one in a error message, it generally means trouble.  In the past, I've actually had to code around it.

  Try turning off the macro warning first as the others have suggested.  That may clear it up.  After that, you'll need to take apart the process that is occuring when the error occurs and figure out if you can change something or do something differently not to trigger the error.

JimD
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 4

Author Comment

by:billcute
ID: 20349110
Mx:
By Setting to low seems okay but what are the consequences?
0
 
LVL 4

Author Comment

by:billcute
ID: 20349112
tbsgadi:
Your suggestions seems to provide better understanding of the problem.
0
 
LVL 75
ID: 20351012
"By Setting to low seems okay but what are the consequences?"

In theory, if set to Low, a 'virus' (not really) could be loaded. What that actually means is that someone could send you an MDB with an AutoExec Macro that runs a function that executes the Shell Command with deletes everything on your hard drive.  This happened once circa 2002 which is why M$ implemented the macro (in)Security mess for A2003. It is and always has been a joke, because it is *easily* circumvented a number of ways ... thus ... False Security.  IF ... it's Your MDB and you have control over it and you and your users are the only ones using it, then you don't really have anything to worry about.  IF ... *someone else* sent you a different MDB with the above scenario ... then you could have a problem ... because the Macro Setting is Global for Access.

mx
0
 
LVL 4

Author Comment

by:billcute
ID: 20354017
MX
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now