D
Damon Heron
I have a product form that fires an update query :
INSERT INTO ProductLocation ( ProductID, LocationID )
SELECT DISTINCT Products.ProductID, Products.LocationID
FROM Products INNER JOIN ProductLocation ON
Products.ProductID=ProductLocation.ProductID
WHERE (((Products.ProductID)=Forms!Products!ProductID) And
((Products.LocationID)=Forms!Products!cmbLocation));
I only want to do this when a new record is created -in other words the user
cannot change the product location on existing products without following
procedure. The combobox "cmbLocation" can only be changed on a new record.
My problem is the error msg for the query about "Access cannot update
.....due to the following violations...." This occurs when the user changes
anything on an existing form, so I can see my problem is the query running
each time any change is made, not just updating product location.
Is this clear? I am somewhat of a newbie. Thanks for your help!
Damon
INSERT INTO ProductLocation ( ProductID, LocationID )
SELECT DISTINCT Products.ProductID, Products.LocationID
FROM Products INNER JOIN ProductLocation ON
Products.ProductID=ProductLocation.ProductID
WHERE (((Products.ProductID)=Forms!Products!ProductID) And
((Products.LocationID)=Forms!Products!cmbLocation));
I only want to do this when a new record is created -in other words the user
cannot change the product location on existing products without following
procedure. The combobox "cmbLocation" can only be changed on a new record.
My problem is the error msg for the query about "Access cannot update
.....due to the following violations...." This occurs when the user changes
anything on an existing form, so I can see my problem is the query running
each time any change is made, not just updating product location.
Is this clear? I am somewhat of a newbie. Thanks for your help!
Damon