Solved

Error 3320 when trying to update access table

Posted on 2014-02-25
10
925 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
[X]
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
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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
 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

749 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