Solved

Error 3320 when trying to update access table

Posted on 2014-02-25
10
875 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
ID: 39886056
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
ID: 39886297
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
ID: 39886483
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
ID: 39886508
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
ID: 39887088
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
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 84
ID: 39888347
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
ID: 39907795
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
ID: 39907841
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
ID: 39909353
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
ID: 39912304
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

911 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

24 Experts available now in Live!

Get 1:1 Help Now