Solved

Error 3320 when trying to update access table

Posted on 2014-02-25
10
857 Views
Last Modified: 2014-03-07
Experts,

I am getting this error when a macro runs which is trying to update an Access table.  (see attached). Runtime Error 3320

The statement that is failing is:

UPDATE tbl_Standard_Report a IN 'Directory\my.mdb'
 SET a.LastGenerated= #2/25/2014 10:28:33 AM#, a.Duration='00:00:41',     a.LastGeneratedBy='username'
 WHERE a.ReportID=111

Does anyone see what is wrong.  I am running someone else's code.  I did notice that the high level qualifier a is not assigned to a table.  I don't know if that could be the problem.
run-time-error.doc
0
Comment
Question by:morinia
  • 6
  • 4
10 Comments
 
LVL 84
Comment Utility
The error seems to be coming from the database table "tbl_Standard_Report" - essentially, it's telling you that a validation rule in that table is not valid.

Can you open tbl_Standard_Report in Access, and then open it in Design view? From there, you'd have to look at the fields and see if one of them has a value specified in Validation Rule property (in the General tab).
0
 

Author Comment

by:morinia
Comment Utility
I did notice that there are two fields for each person.  One is operator and the other is administrator.

I am thinking that administrator needs to be checked for me to update the table.  Currently only operator is checked for my name.
0
 
LVL 84
Comment Utility
I did notice that there are two fields for each person.  One is operator and the other is administrator.
You'd have to explain that further. The error you presented is pretty straight forward (i.e. you've got troubles with a validation rule), but I don't have any idea what you mean by "administrator" or "operator". Those are not standard Access terms.
0
 

Author Comment

by:morinia
Comment Utility
It was just a table with users listed.  However, I am still getting the error so I am looking to find out what I do not have access to.

Thanks for your help so far.  I will let you know when I find it.  I too felt it is something with validation somewhere.
0
 

Author Comment

by:morinia
Comment Utility
Experts,

The above listed command runs file if you run in in the SQL portion of Access.  However when executed from the same database in a macro in VB it gets the runtime 3320 error.

When the command is put into a string and run in VB (see below) that is when I get the error.

  DoCmd.RunSQL (strUpdate)
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 84
Comment Utility
What version of Access is this?

If it's 2007 or higher, then be sure the database is in a Trusted Location. Code (including macros) cannot run if the database is not in a Trusted Location.

YOu can add Trusted Locations from the Access interface - open the Options dialog, click the Trusted Locations option, and then add locations if needed.

Here's more information on TLs: http://office.microsoft.com/en-us/access-help/create-remove-or-change-a-trusted-location-for-your-files-HA010031999.aspx
0
 

Author Comment

by:morinia
Comment Utility
Experts,

I think I may have found the problem.  I am running Windows 7 and the Access Database is 2000.  All of the other databases that the same code works fine are 2003.  

I am able to update the database in Access using SQL with no problem and I can create a function in Access 2003 and update the database with no problem.

While searching the web I saw where older versions being opened with newer versions can possibly give this error.

Does anyone know the best way to convert the Access 2000 database to Access 2003?
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
The default format for Access 2003 was 2000, so I'm not sure that's your problem.

Have you reviewed that table to determine what's in the validation rule? If you can post the actual rule, we might be able to determine what's going on.
0
 

Author Comment

by:morinia
Comment Utility
Scott,

The problem is not the compatibility with Access 2000 to Access 2003.  It is that I am running in Windows 7.   Windows 7 is not compatible with Access 2000.  

My coworkers who are running Windows XP, do not have the issue.  

I will be converting the database today and will confirm if this fixes the proble.

FYI,

There were similar issues with drivers for Oracle.  The Oracle in OraClient 10_g worked fine in Windows XP, however I had to use Oracle in OraClient 11_g in Windows 7.

It is probably rare instances that an Operating System is upgraded to Windows 7 and Access 2000 databases are still being used.
0
 

Author Closing Comment

by:morinia
Comment Utility
There may have been a problem when someone restored the database.  Yesterday, I copied the database and converted it to Access 2003.  I also did a repair.  This morning th job ran without a problem.

At this point, I am not sure what the exact problem was.  However you are correct the issue was not Access 2000 to Access 2003.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

15 Experts available now in Live!

Get 1:1 Help Now