Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

How do I operate an table in access using VB?

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
wilkinswong
Asked:
wilkinswong
1 Solution
 
Lord_2KewlCommented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now