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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating records vs. adding records

Status
Not open for further replies.

Russ1005

Programmer
Dec 13, 2004
96
US
I have a form and I want to update an existing record if onc exists or add a new record if the primary key doesn't exist. Currently when I save the form, it tries to add a new record and gives me a primary constraint violation on the primary key instead of updating the existing record. I have the table set up as indexed Yes no duplicates.

How can I update a new record instead of add a new record?

Thanks,
-Russ
 
Hi
I think perhaps a little more information is needed, for example: has this form got a record source?
 
The record source is:

SELECT [customer_claims_check_request].* FROM [customer_claims_check_request]

This is very weird. I just updated the record successfully without getting the contraint violation error. The odd thing is, I didn't change anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top