TConnolly
Lifetime Supporting Member
I'm using RSView VBA to record the last parameter adjustments made for a given product in an MS Access data base. The Access table contains PartNumber (string), Param1, Param2, Param3,(integers), and LastUsed (Date/Time) fields.
Reading and Updating existing records is easy. However, UPDATE only works if the part number is already in the data base. Whenever a new part number is created its necessary for someone to add it to the DB. I want any new part number to automatically add to the data base table, but to do that apparently I have to use the APPEND statement.
Is there a different SQL statement that will update the values if the record exists, or automatically append if the record doesn't exist? Or do I need to first query to see if the record exists and then choose whether to use UPDATE or APPEND? If so, how do I query to see if the record exists?
Reading and Updating existing records is easy. However, UPDATE only works if the part number is already in the data base. Whenever a new part number is created its necessary for someone to add it to the DB. I want any new part number to automatically add to the data base table, but to do that apparently I have to use the APPEND statement.
Is there a different SQL statement that will update the values if the record exists, or automatically append if the record doesn't exist? Or do I need to first query to see if the record exists and then choose whether to use UPDATE or APPEND? If so, how do I query to see if the record exists?