Key Violations (1 Viewer)

Sander

Registered User.
Local time
Today, 15:23
Joined
Jun 6, 2001
Messages
20
I have a form with a dropdown box where the user selects a name. This is the criteria for an append query. Using that criteria the query goes out and searches the main database and appends it into a temporary database. The information in the temporary database is used to select a record and will then pull all the information in the record up.

Here's the catch:
What the user is searching for is a Shop Work Sheet (SWS). Each SWS is assigned a Number (SWSnumber). Each SWS has item numbers and descriptions. When the record is saved, the amount of records saved depends on the item numbers and description. Example - if there are two item numbers with descriptions then the SWSnumber is saved twice. Once with the first item, once with the second. (Note: I didn't design this database.)

Now because the user only needs one item number and description to decide if that's the record they want, I made the SWSnumber in my temp table a primary key. I know this is why I'm getting a key violation. But this is giving me the information I want.

My question is:
Is there a way not to have the "Microsoft Access can't append all the records in the append query." box pop up and have the user click 'Yes' run the query anyway? Is there a way to get rid of the box and run the query anyway?

If it makes a difference, I'm working in Access 7.0.

If anyone has any thoughts, I'd appreciate it. Thank you in advance! =)
 

KDg

Registered User.
Local time
Today, 15:23
Joined
Oct 28, 1999
Messages
181
check out "setwarnings" in the helpfiles, i think it's what you're after, if not or u have any problems post back,

HTH
 

Users who are viewing this thread

Top Bottom