Solved

How do I operate an table in access using VB?

Posted on 1998-08-06
1
134 Views
Last Modified: 2010-08-05
I creat a table in Access using VB and can add only the first record in the table. However, it is rejected when adding the second record and the system recognize as an '3022' run time error.
0
Comment
Question by:wilkinswong
1 Comment
 

Accepted Solution

by:
Lord_2Kewl earned 20 total points
ID: 1468090
Hello,

Actually the run-time error 3022 means that the commit of the new record is refused because it violates a rule in your database. This can be a duplicate value for an index, a primary key or a relationship. Making sure that the values clashing with this rule, or rules, are distinct will solve your problem.
For a reference to the trappable errors look for the section
"Trappable Microsoft Jet and DAO Errors". As far as I know this
section is not directly accessable but it can be linked to by finding the "Number" property of the DAO "Err" object.

Good luck and Have Fun.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

810 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