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

Append only new data

Status
Not open for further replies.

flaviooooo

Programmer
Feb 24, 2003
496
FR
Hi,

I have a table that i want to append with a query. But i'd like to show an error-message if the user tries to append a record that is already in the table.

Ok, i know you are thinking: give the fields in the table a UniqueValue, but you can only define 10 Unique fields, while the table has about 20 fields, and all of them have to be unique!

Is there a solution to my problem?
Thanks
 
Shouldn't be too hard. Just try to create a recordset with all of the field used in the WHERE portion, so that you're looking for a record that matches exactly what the user has entered. If you find a record, you know you can't add the one your user supplied.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top