Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Error 3320 when trying to update access table

Posted on 2014-02-25
10
Medium Priority
?
1,063 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 85
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 85
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

877 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