?
Solved

How do I operate an table in access using VB?

Posted on 1998-08-06
1
Medium Priority
?
145 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
[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
1 Comment
 

Accepted Solution

by:
Lord_2Kewl earned 40 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 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