A
Access Novice
Based on "Northwind" database.
I am trying to create an update query as follows:
I added a field to the customers table, and named it "Status".
I wish to update this filed according to each customer's total order. I
created a totals query which calculates the total orders per customer (the
SUM of unitprice*quntity from order details table).
I wish that for all customers which their total order is above 200,000 the
status will be updated to "VIP"
All customers which their total order is between 100,000 & 200,000 the
status will be updated to "Very good customer"
All customers which their total order is between 100,000 & 200,000 the
status will be updated to "good customer"
All others will be updated to "Normal".
I did as follows: I created a select query (names 'temp') which calculates
the total orders per customerID.
Based on this 'temp' query I added another query based on the 'customers'
table and 'temp' query. I added only the 'status' field and wrote in the
update to field the following sentence
IIf([temp]![Expr1]<=25000,"Normal",IIf([temp]![Expr1]<=50000,"good
customer",IIf([temp]![Expr1]<=75000,"very goog customer","VIP")))
I always get the message "operation must use an updateable query"
What did I do wrong?
Thanks for your time.
I am trying to create an update query as follows:
I added a field to the customers table, and named it "Status".
I wish to update this filed according to each customer's total order. I
created a totals query which calculates the total orders per customer (the
SUM of unitprice*quntity from order details table).
I wish that for all customers which their total order is above 200,000 the
status will be updated to "VIP"
All customers which their total order is between 100,000 & 200,000 the
status will be updated to "Very good customer"
All customers which their total order is between 100,000 & 200,000 the
status will be updated to "good customer"
All others will be updated to "Normal".
I did as follows: I created a select query (names 'temp') which calculates
the total orders per customerID.
Based on this 'temp' query I added another query based on the 'customers'
table and 'temp' query. I added only the 'status' field and wrote in the
update to field the following sentence
IIf([temp]![Expr1]<=25000,"Normal",IIf([temp]![Expr1]<=50000,"good
customer",IIf([temp]![Expr1]<=75000,"very goog customer","VIP")))
I always get the message "operation must use an updateable query"
What did I do wrong?
Thanks for your time.