Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

key violation error number?

Status
Not open for further replies.

Betsvigi9

IS-IT--Management
May 31, 2001
46
GB
I have used indexing in a stock system to prevent users from inputting the same stock remaining data twice. (This information is obtained from a weekly stock take) I use a button control to automatically include all the stock items and today's date. The user then amends the amounts as appropriate. The indexing prevents the user from adding all of the stock items twice if they press the button again in error but, it produces rather an ugly key violation error message which I would like to replace. I know how to do this, but I have been unable to generate the error number and I cannot find it in the Access and Jet Errors list.

Can anyone help me out?

Thanks
 
Try using the following:

Docmd.setwarnings False

before you run your query, but remember to make sure that your code (including error handling turns your warnings back on) by using the following:

Docmd.setwarnings True

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top