Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2007-11-25
7
978 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 - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

791 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