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

Update query

Status
Not open for further replies.

peljo

Technical User
Mar 3, 2006
91
BG
I have an updatable query based on 2 queries.qryinput and qry output. I want to update a field in the table products with this result. Since the query is non updatable ,how should i proceed, can i use the dlookup function? How should it look like? My query is the following
SELECT qryInput.ProductID, qryInput.Sum1, qryOutput.Sum2, [Sum1]-[Sum2] AS Rest
FROM (qryInput INNER JOIN qryOutput ON qryInput.ProductID = qryOutput.ProductID) INNER JOIN products ON qryInput.ProductID = products.Productid;

I want to update the field products.items4( table products,field items4) with the field Rest from the query.
Can you help me ?
 
First, take a look at:
Harnessing the Power of Updatable Queries

Second, first you say the query is updatable (fourth word in your post) then you say it's non updatable. This is confusing to readers. Make sure you're clear in your questions.

Finally, you want to hold a calculated field in a table. This is against Normalization. Make sure your tables have gone through at least the first three steps of Normalization. Then you don't need to hold the calculationl.
 
How do you get rid of or suppress the warning message before an action query takes place?

(Posted in thread705-1351162 )

As listed on previous posts, you can go to
Tools---Options---Edit/Find tab---- uncheck confirm Action queries

Using VBA, this seems to work too:

'This will uncheck the (uncheck the box on Tools-Options-'Edit/Find tab - confirm delete Action queries)
Application.SetOption "Confirm Action Queries", False



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top